Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Dubber Dan on
I've got a small table on one of my pages at http://boahc.co.uk/pracinfo/winsley and I'd like it centered so have coded <table cellpadding="0" cellspacing="0" align="center">
which works fine in IE but the table still left aligns in Firefox.
What do I need to change to get the table to center in Firefox?
Comments
Hi Dan, firefox centers in a
Hi Dan,
firefox centers in a different way to IE
try adding style="margin: 0 auto" into the table tag. this applies a 0 margin at the top and bottom of the table and makes the left and right margins equal. this and the align="center" should have it centered in both IE and Firefox.
Cheers for that. I created
Cheers for that. I created a new class of table in my css with those margins so that I can easily use it if I need another centered table
Thanks
Thanks, that works for my table centering in firefox now.
*****************************
Drupal Video Tutorials (Spanish)
www.drupalcarmen.com
Works for Firefox + Chrome
Thanks for the fix.