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

how to vetically center an image in unknown height screen?

  • # August 24, 2009 at 10:01 pm

    1, we don’t know the height of the screen;
    2, It should work in both IE6 and firefox;

    my question is how to vertically center a DIV that including an Image?
    any suggestion will appreciate.


    and hereby the codes:


    < ![if IE]>

    < ![endif]>

    # August 27, 2009 at 2:24 am

    try margin: 0 auto;

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

You must be logged in to reply to this topic.