Click here to Skip to main content
15,916,463 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
I have a code like

Left side Div

Right side Div



At present 2 Divs inside are displayed one below another. How can I display them side by side? i.e. one on the left and other on right side
Posted

One approach would be using floating divs. The main problem is that the divs will be displayed on top of each other as soon as they reach a certain width. The workaround is defining a max-width.

http://jsfiddle.net/NuxAx/1/[^]
 
Share this answer
 
add style

leftdiv
{
position:absolute;
left:0px;
width:100px;//desired value
}
rightdiv
{
position:absolute;
left:600px;//total-width of this
width:100px;//desired value
}

you can set these values in % also....
 
Share this answer
 
You have to use Float property of div
 
Share this answer
 
This is the way to find good amount of appropriate samples: http://bit.ly/OugRpV[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900