Support Forum » Style Master

Center Vertically using DIV

(3 posts)
  • Started 2 years ago by Koolsteve
  • Latest reply from Koolsteve

  1. Koolsteve
    Member

    Hi all,

    Just purchased SM. Have gone through tutorial.
    I expect this has been asked a thousand times, so please excuse the newby question.

    I'm in the process of putting up a hold page for my website while I build the rest of the site. So this is just a rectangular image - nothing too complicated. Using SM I have managed to get the rectangle image to center horizontally and vertically in Firefox (adjust browser size and image remains dead center). When I view it in IE6 or 7 it centers horizontally but not vertically.

    I expect after a bit more learning I'll get to grips with how to! But just to get me out of a problem initially, can someone supply me with the correct coding so that the image will sit central in the browser horizontally and vertically?

    Many thanks,
    Koolsteve

    NB: Really impressed with SM!

    Posted: 2 years #
  2. JohnAllsopp
    Member

    Hi KS,

    vertical centering is a bit of a black art in CSS. Here are some good places to start getting into the details

    http://www.jakpsatweb.cz/css/css-vertical-center-solution.html
    http://www.student.oulu.fi/~laurirai/www/css/middle/
    http://www.hicksdesign.co.uk/journal/how-to-vertical-centering-with-css

    Let us know how you get on

    john

    Posted: 2 years #
  3. Koolsteve
    Member

    Thanks John,

    I'll go and read up on resources supplied. May just stay with fixed positioning for safety sake.

    Regards,
    Koolsteve.

    Posted: 2 years #

RSS feed for this topic

Reply

You must log in to post.

0.053 - 9 queries