treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Float Divs Not Adjacent?

  • I'm trying to create two columns next to each other. I figured the easiest way to do this would be to float them but for some reason their not appearing next to each other. Please help!

    Simple put: Why aren't these two floated divs appearing adjacent to each other?

    http://aarongmoore.com/test/layout.html

    Update: This can probably be ignored now. I found Chris' All About Floats screencast and about a minute in I came to realize only one div needs to be floated, not both.

  • I can take a guess as to why it wasn't working before you removed one of the floats. The two floats width, padding, and border added up were greater than the container width.