Experience10  Creative, Develop, UX, Wireframe, Productivity

display:table 使得盒模型不一致

Safari 下如果display:table;那么Box的宽度将只算Width的宽度,不算Padding/Margin,而在Firefox下面,还是和传统的元一样,最终Width=width+Padding+margin。

解决办法是,经过测试,就算父元素不使用display:table;子元素继续使用display:table-cell;也能使整个元素继续以表格状态呈现。

This entry was written by allan, posted on May 17, 2010 at 12:41 pm, filed under Front End. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

Timeline

Have your say

Add your comment below, or trackback from your own site. Subscribe to these comments.


Copyright 2010 Experience10.com
Designed by Allan