Centering content horizontally AND vertically with CSS?

Discussion in 'HTML' started by Lenny, Oct 15, 2003.

  1. Lenny

    Lenny Guest

    I want the content to be dead center no matter how big the browser
    window is. I can get it horizontally but I can seem to get the < div >
    to center vertically. Any suggestions?

    Thanks
    Lenny
     
    Lenny, Oct 15, 2003
    #1
    1. Advertising

  2. Lenny

    Andy Holmes Guest

    Lenny wrote:
    > I want the content to be dead center no matter how big the browser
    > window is. I can get it horizontally but I can seem to get the < div >
    > to center vertically. Any suggestions?
    >
    > Thanks
    > Lenny



    Keep in mind, or note if you didn't know already, that the height of
    block elements such as <body>, <p> or <div> is defined by their content
    unless specifically told to be bigger. So technically it is vertically
    centered.
     
    Andy Holmes, Oct 16, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JSOUL
    Replies:
    3
    Views:
    474
    Barbara de Zoete
    Nov 9, 2005
  2. Replies:
    0
    Views:
    422
  3. Replies:
    5
    Views:
    766
    loga123
    Jun 16, 2006
  4. Replies:
    1
    Views:
    417
  5. Scott
    Replies:
    5
    Views:
    1,424
    Jan C. Faerber
    Oct 29, 2009
Loading...

Share This Page