www.webdeveloper.com
Results 1 to 5 of 5

Thread: Table position

  1. #1
    Join Date
    Jun 2006
    Location
    Yorkshire, England
    Posts
    109

    Red face Table position

    Hi,
    How do I position / align a table to display in the centre of the page? Is it to do with the body tag?

    I tried the using align in the body, and my headings and row data was also aligned in the middle of the cells.

    Any advice appreciated. Thanks.

  2. #2
    Join Date
    Mar 2006
    Location
    Newcastle NSW Australia
    Posts
    4,033
    Probably a couple of ways. You could use align="center" in the table tag, or you could enclose the table in a div with margin-right and margin-left set to "auto"

    Cheers
    Graeme

  3. #3
    Join Date
    Jun 2006
    Location
    Yorkshire, England
    Posts
    109
    Thanks.

    But, I would like it so my (small) table is in the centre of the browser and not just the middle (top).

    Hope to hear again...

  4. #4
    Join Date
    Jun 2006
    Posts
    384
    you could have the table in a div which is then positioned using javascript?

  5. #5
    Join Date
    Jan 2004
    Location
    Sweden
    Posts
    850
    since you already use tables you could might aswell add <center> tag.
    but you should consider using divs for layout

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles