我有以下代码导致文本溢出div。
如果我重新调整lg或xs的大小,它会重新构造句子以适合
<div class="col-lg-8 col-lg-offset-2 col-md-8 col-md-offset-2 col-sm-8 col-sm-offset-2 col-xs-12 col-xs-offset-0">
<div class="thumbnail">
<div>
<p>
This sentence is overspilling the border oft eh div and causing me some problems that i wish it didnt. It does not do this for sm, xs or lg
</p>
<p>
All icing figures, bespoke cake shaping and decoration are charged additionally and are dependent on individual requirements and the time taken to make.
</p>
</div>
</div>
</div>
答案 0 :(得分:1)
尝试将其全部包装在另外2个div中,如下所示:
<section id="something">
<div class="container">
<div class="col-lg-8 col-lg-offset-2 col-md-8 col-md-offset-2 col-sm-8 col-sm-offset-2 col-xs-12 col-xs-offset-0">
<div class="thumbnail">
<div>
<p>
This sentence is overspilling the border oft eh div and causing me some problems that i wish it didnt. It does not do this for sm, xs or lg
</p>
<p>
All icing figures, bespoke cake shaping and decoration are charged additionally and are dependent on individual requirements and the time taken to make.
</p>
</div>
</div>
</div>
</div><!-- end container -->
</section>