unidox Posted July 27, 2008 Share Posted July 27, 2008 I am trying to make my website css and divs only. The problem is, my floats are messed up. I have 5 columns, left | spacer1 | content | spacer2 | right left, spacer1, content, spacer2 all have float: left, and right has float: right. This is my html: <div id="left"></div> <div id="sep_left"></div> <div id="center"></div> <div id="sep_right"></div> <div id="right"></div> When I view the site, it shows like this: left | content | spacer1 | spacer2 | right Whats wrong? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/116786-solved-float/ Share on other sites More sharing options...
unidox Posted July 27, 2008 Author Share Posted July 27, 2008 Just an update, It works fine in IE7, just not in ff. Quote Link to comment https://forums.phpfreaks.com/topic/116786-solved-float/#findComment-600563 Share on other sites More sharing options...
karldesign Posted July 29, 2008 Share Posted July 29, 2008 They should all be floated left, except the right column Quote Link to comment https://forums.phpfreaks.com/topic/116786-solved-float/#findComment-602561 Share on other sites More sharing options...
TheFilmGod Posted July 30, 2008 Share Posted July 30, 2008 Your code idealogy is flawed. The spacers should not be divs, but margins of the other divs. You should float all divs left. Quote Link to comment https://forums.phpfreaks.com/topic/116786-solved-float/#findComment-603224 Share on other sites More sharing options...
DataRater Posted July 30, 2008 Share Posted July 30, 2008 Adding to TheFilmGod's post, try removing your spacer divs and adding a 'margin-left' and 'margin-right' to 'center'. Quote Link to comment https://forums.phpfreaks.com/topic/116786-solved-float/#findComment-603458 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.