CSS Whitespace正常不包装在h3标签上

时间:2012-09-29 08:56:24

标签: html css css3

我想要一些文字来包装所以我有这个:

h3.h3_title {
    white-space:normal !important;
}

这是html:

<li>
<a href="#">
<img src="img.png" />
<h3 class="h3_title">this is some text which is supposed to wrap but it is not happening</h3>
</a>
</li>

出于某种原因,它不是包装......以及想法为什么?

1 个答案:

答案 0 :(得分:5)

h3.h3_title {
    white-space:normal !important;
    width:20px !important;
}

根据您的条件设置宽度