Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Centering a TABLE within a DIV

I'm looking to make this table lay in the center of its containing div and its driving me crazy! Tried to use CSS and HTML tricks to do it and nothing is working. My last effort was going to be to just add padding to the left of the columns and just eye it out but I decided to ask for some help before going to such a measure.

http://jsfiddle.net/RQXvR/

like image 293
user1053263 Avatar asked Feb 27 '12 06:02

user1053263


1 Answers

try this css for your table

table {margin: 0 auto;}
like image 156
Hassan Z Avatar answered Sep 30 '22 05:09

Hassan Z