Reputation: 3897
I am attempting to center a table and its rows in CSS.
I can center the table fine using:
table.Center
{
margin-left:auto;
margin-right:auto;
}
But when I try and call something similar on the table row I end up with the result below:
The desired result being:
XX
XXXX
XXXX
Used two instead of three for the sake of the visual.
How can I center the table row to the page?
Upvotes: 0
Views: 255
Reputation: 46
CSS solution:
table {
text-align:center
}
td {
display:inline-block
}
Upvotes: 3