简体   繁体   中英

Stop word-wrap in html

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;
    height:34px;
    padding:12px 6px 0 6px;
    color:#cc8d50;

}

Try:

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

Add that to your CSS.

在你的 css 中插入:

white-space:nowrap;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM