让自动宽度的LI标签自动换行

最近在修改akcms做的一个英文垃圾站的时候用自动宽度的li标签做导航的循环输出,发现在IE下显示的时候由于li标签不能自动换行而li内的文字又太多时,导致li内的文字把li标签撑高,而Firefox下显示正常,查了半天资料发现这种情况只需要在li的样式中加入

white-space: nowrap;

即可让li标签整个自动换行。

This entry was posted in Code and tagged , . Bookmark the permalink. [62 views]

Related Posts

Comments are closed.