Treehouse: Grow your CSS skills. Land your dream job.

Why does header position affect parent element?

  • # July 23, 2010 at 9:44 pm

    Hi all!

    I ran into a web issue that I don’t quite understand. Here is an example of what I am talking about:

    Take a look at the bottom 3 boxes. I would essentially like the boxes to line up with the first, and I can do that by changing the positioning of the header element to absolute.

    It’s not exactly the solution that I am curious about (because I can solve it) but I’m more curious about why this is happening.

    As the second box demonstrates, it appears that the box is affected by the position of the top of the text contained in the header element. Why is this?

    Any insight would be appreciated!

    P.S. This is web site rubrick, so the design is not finished! No nitpicky-ness!

    # July 23, 2010 at 9:57 pm

    further research tells me that it has something to do with the verticle-align property, which I still don’t fully understand.

    BTW, the site rocks: … -it-sucks/

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

You must be logged in to reply to this topic.