Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fit two divs side by side horizontally?

Tags:

html

css

layout

How to sit two divs side by side horizontally using css, where the direction of the container DIV is from right to left ?

like image 279
Adham Avatar asked Sep 30 '11 22:09

Adham


People also ask

How do I put multiple divs side by side?

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.

How do I horizontally align a div in CSS?

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.

How do you split a HTML page into two parts horizontally?

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.


1 Answers

<div style="float:right;">
    Right div
</div>
<div>
    Left div
</div>
like image 94
Dennis Traub Avatar answered Sep 28 '22 06:09

Dennis Traub