Answers for "CSS ailgn content and align item"

0

html list items horizontally with flexbox

for example: 
(html)
<ul class="navbar-items">
	<li> <a href="#start">Start</a> </li>
    <li> <a href="#profile">Profile</a> </li>
    <li> <a href="#projects">Projects</a> </li>
    <li> <a href="#info">Info</a> </li>
</ul>

(css)
ul.navbar-items /* Important part */
{
    display: flex;
    align-items: stretch; 
    justify-content: space-between;
    width: 100%; /* play with this number to get spacings correct */
}

ul.navbar-items li /* Extra part, to style each item */
{
    padding: 10px;
}
Posted by: Guest on March-28-2020
-1

how to align an image left in css

<div style="text-align: left"><img src="image/your-image.png" width="100" /></div>Copy
Posted by: Guest on May-03-2020

Browse Popular Code Answers by Language