开发者

Why an empty cell doesn't show its border?

开发者_StackOverflow社区

Can anyone give me an explanation based on specification of CSS or HTML?


From W3C website, link: http://www.w3.org/TR/REC-html32.html

Tables are commonly rendered in bas-relief, raised up with the outer border as a bevel, and individual cells inset into this raised surface. Borders around individual cells are only drawn if the cell has explicit content. White space doesn't count for this purpose with the exception of  .

Hope that answers your query. In general, do not leave any div, span or td empty, put   and use CSS to set font size and heights to cover up height related issues.


if this is a problem with IE it is impossible to give an explanation based on specification, as IE doesnt follow those

Edit : i am wrong in this case as Kumar's answer prooves :)

just fill em up with a  

take a look at CSS to make an empty cell's border appear?


The easiest solution is to insert a non-breaking space in the cell ( )

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜