Jump to content
Sign in to follow this  
Oliazk

help on centering on a page....

Recommended Posts

I need to center a table on a page so that its allways in the middle of the page. Not just down the center. But so that on any size it will always end up in the center of the page dead center hopefully.thanks for any suggestions

Share this post


Link to post
Share on other sites

you know css, right? :)if so add this to the body's css:text-align:center;or if you only want that table centered and not the rest, put the table in a div and apply the css to that.LG

Share this post


Link to post
Share on other sites

ok i can center the table i have no problem with css but i want it to be centered in the middle of the page not just vertically but also horizontally

Share this post


Link to post
Share on other sites

Actually the <center> element is deprecated and should not be used. I would do what Little Goat said:

body {text-align: center;margin: 0 auto;}

margin:0 auto; will center in all the other browser except IE so that's why you need text-align: center;

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...