Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Centering a table IE V Firefox


Go to End


3 Posts   2089 Views

Avatar
Tigerpie

Community Member, 10 Posts

12 June 2009 at 3:59am

I am building my site and using Firefox v3.0.10 and IE 8.
when i create a table via the CMS and center it on the page in IE8 it looks fine, however when i open the same page in Firefox it is not centered...is this a known problem / bug and is there something i can do about it?

example can be seen here

http://www.heckmondwikepanthers.co.uk/

Avatar
sphire

Community Member, 6 Posts

13 June 2009 at 12:54am

The table in that example is using the align attribute which is deprecated in XHTML. The correct way to do centering would be to add the following bit of CSS in the right spot:

table {
margin: 0 auto;
}

That sets the top/bottom margins to 0 and the left/right margins to auto.

Avatar
Tigerpie

Community Member, 10 Posts

15 June 2009 at 10:40am

Thanks for that Sphire.

Where would the right spot be to put this?