Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Centering a table in Firefox

I've got a small table on one of my pages 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.

If i use text-align:center n align:-moz-centerits not working in IE

What do I need to change to get the table to center in Firefox? If I should use -moz-center how to make it work in IE?

I'm stuck here.

like image 387
Praneel PIDIKITI Avatar asked Dec 29 '22 08:12

Praneel PIDIKITI


1 Answers

Add margin: auto; to the table. That is the standard way to do it.

like image 104
Lekensteyn Avatar answered Dec 30 '22 21:12

Lekensteyn