Jump to:

23473 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Centering a table IE V Firefox

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

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

Page: 1
Go to End
Author Topic: 1240 Views
  • Tigerpie
    Avatar
    Community Member
    10 Posts

    Centering a table IE V Firefox Link to this post

    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/

  • sphire
    Avatar
    Community Member
    6 Posts

    Re: Centering a table IE V Firefox Link to this post

    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.

  • Tigerpie
    Avatar
    Community Member
    10 Posts

    Re: Centering a table IE V Firefox Link to this post

    Thanks for that Sphire.

    Where would the right spot be to put this?

    1240 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.