Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    334
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Center/centre table ??

    Hey

    How do I align a table to the middle of the page using CSS ??

    I am trying not to use align="center" in the code

    Any ideas ??

    Thanks

  2. #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    table {
    margin:auto;
    }

    ..but that doesn't center your table in Win/IE5 if I'm right. For IE5 you need text-align:center. But that centers about everything on your page, so then you have to use text-align:left at all places you don't want your stuff centered...

  3. #3
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    <div style="width:100%;text-align:center;">
    <TABLE> here....
    </div>


 

Posting Permissions

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