Grow your CSS skills. Land your dream job.

Float Divs Not Adjacent?

  • Anonymous
    # February 12, 2011 at 11:49 pm

    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.

    # February 13, 2011 at 8:44 am

    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.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".