Categories
Uncategorized

How to float 3 divs side by side.

The modern way is using the CSS3 flexbox

Put the following into the .css file:

.container {
display: flex;
} .container > div {
flex: 1; /*grow*/
}

Put the following into the page code:

<div class=“container”>
<div>Left div</div>
<div>Middle div</div>
<div>Right div</div>
</div>

 

Leave a Reply

Your email address will not be published. Required fields are marked *