October 9, 201214 yr Hello, Basically i am looking for put div side by side. Can any one tell me how is it done with CSS? As we know that table is so old idea & i am not able to make columns with divs. I end up one above & other, I never get side by side css. Can any one tell me how to solve this problem? Thanks in Advanced!
October 9, 201214 yr You have to add float: left; or float: right; to all the divs that you want side by side and then clear the floats to stop the following div moving to an incorrect position. See itms 2b, 2c and 2d here http://www.wickham43.net/firefoxbackground.php for three ways to clear floats.
October 9, 201214 yr Yeah, Totally Agree with Wickham. You may follow above link. You will get better idea
October 9, 201214 yr it's easy you have to give float to one of the div's or both of them. an easy example would be : <div class="container" style=""> <div style="float:right;display:inline-block;background:#cee">Right</div> <div style="float:left;background:#dee">Left</div> </div> for the second div I gave it a float left, you can give it right float if you want them to be close,and them give some padding.
Create an account or sign in to comment