I have a long text inside a div
with defined width
:
HTML:
<div>Stack Overflow is the BEST !!!</div>
CSS:
div {
border: 1px solid black;
width: 70px;
}
How could I force the string to stay in one line (i.e. to be cut in the middle of "Overflow") ?
I tried to use overflow: hidden
, but it didn't help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…