开发者

having trouble centering table in Chrome and Safari

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.

  1. Always provide a width to the object you are trying to center
  2. Once a width is set then use margin:0 auto; on that element
  3. Enjoy seeing your code centered...
  4. 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%;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜