开发者

Stop word-wrap in html

开发者 https://www.devze.com 2023-01-15 07:26 出处:网络
I don\'t want word wrap but this is being. I have set width more than text length but this is still breaking so how can I stop word break.

I don't want word wrap but this is being. I have set width more than text length but this is still breaking so how can I stop word break.

css

.menu{
    float:left;
    width:120px;
    heigh开发者_运维问答t:34px;
    padding:12px 6px 0 6px;
    color:#cc8d50;

}


Try:

.menu{
    white-space: nowrap;
...

Add that to your CSS.


In your css insert this:

white-space:nowrap;
0

精彩评论

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

关注公众号