carlg Posted September 14, 2007 Share Posted September 14, 2007 Let's say I have a div section and the size is 800width x 400 height. Now I have 2 other div sections that are each 400x400. I want to place them inside of the 800x400 div so they are right along side of each other. How can I do this? Everytime I try this, it places the second section underneath the first one and not along side of it Here is some sample code .outerbox{ width:800; height:400; } .sec1{ width:400; height:400; } .sec2 { width:400; height:400; } and here is some sample html <div class="outerbox"> <div class="sec1">content of 1</div> <div class="sec2">content of 2</div> </div> so why does section 1 appear below section 2 and not to the right of section 2 to fill up it's outer container? How can I make section 2 appear to the right of section 2. I know this can be done with absolute and relative positioning, but I'm trying to think of a different way because the positioning sometimes works differently in different browsers. Thanks for the help!!! Quote Link to comment https://forums.phpfreaks.com/topic/69330-css-question/ Share on other sites More sharing options...
ToonMariner Posted September 14, 2007 Share Posted September 14, 2007 float them both left with no border, padding or margin. Quote Link to comment https://forums.phpfreaks.com/topic/69330-css-question/#findComment-348346 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.