How to sit two divs side by side horizontally using css, where the direction of the container DIV is from right to left ?
Three or more different div can be put side-by-side using CSS. Use CSS property to set the height and width of div and use display property to place div in side-by-side format. float:left; This property is used for those elements(div) that will float on left side.
To horizontally center a block element (like <div>), use margin: auto; Setting the width of the element will prevent it from stretching out to the edges of its container.
This can be done with the help of div tags and its child tag named as section tag. But mostly division tag is used for this work.
<div style="float:right;">
Right div
</div>
<div>
Left div
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With