SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2001
    Location
    lush green fields, england
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question vertically center a table in css, (no html height tag)

    i've got a table with a flash animation of 200x100px dimensions - i want the entire table to be centered vertically and horizonatally.

    i'm using document type HTML 4.01 Transitional, for which there is no attribute "HEIGHT"...

    so i can't put a table within a table, and then valign=top, else without the height=100%, the table stays put.

    therefore - how can i make an entire table vertically centered, using CSS.

    i've tried this, but the top left corner of the table is aligned to center, so i tried putting the table in a DIV tag, but that didn't work either.
    Code:
    table.blah {
     position: absolute;
     top: 50%;
     left: 50%;
    }
    any help or alternatives - greatly appreciated!
    I'd rather avoid layers/frames.

    Jam
    Last edited by JamCow; Jan 10, 2002 at 19:25.

  2. #2
    SitePoint Addict
    Join Date
    Feb 2001
    Posts
    302
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    SitePoint Member
    Join Date
    Apr 2001
    Location
    lush green fields, england
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    neil100 - many thanks!
    exactly what i needed!

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you care about Netscape 4.7 users then don't use that method. It doesn't work at all.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •