Jump to content

help on centering on a page....


Oliazk
 Share

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

Link to comment
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

Link to comment
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;

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...