Issue
i am making a porfolio website and using a (HTML,CSS,JS) logo that i need to place them at the centre of the element. i have used the text-align: center but this is not working. i am new into the development.
i have tried text-align : center; but this is not working.
Solution
Based on this you can do as follow
<html>
<body>
<style>
.logo {
border: 1px solid black;
width: 200px;
}
#logo-container {
border: 1px dashed red;
display: flex;
justify-content: center;
text-align: center;
}
</style>
<div id="logo-container">
<div class='logo'>Logo 1</div>
<div class='logo'>Logo 2</div>
<div class='logo'>Logo 3</div>
<div class='logo'>Logo 4</div>
<div class='logo'>Logo 5</div>
</div>
</body>
</html>
Answered By - dudung
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.