KC Rajput KC Rajput - 3 months ago 18
CSS Question

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;

}

Answer

Try:

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

Add that to your CSS.