I am not sure what I am doing wrong. I cannot seem to center table with two im开发者_开发技巧ages between 2 in side the right . Works in firefox, opera, ie8. XHTML and CSS validates.
A few notes on centering.
- Always provide a width to the object you are trying to center
- Once a width is set then use
margin:0 auto;
on that element - Enjoy seeing your code centered...
- Also, if your element is inline (anchor, span, etc) make sure you display the element as
display:block;
If you show some code I'm sure it's a simple fix.
Try setting the width and margin explicitly to add to 100%:
width:90%;margin-left:5%;margin-right:5%;
精彩评论