I have the following jsFiddle. When I resize the window the span is broken into two lines. How do I prevent that? I want the whole span to go to the second line.
<html>
<body>
<div id="dvContainer">
<span style="border:1px;border-style:solid;margin-right:5px;padding:5px;">some text for the first span</span>
<span style="border:1px;border-style:solid;margin-right:5px;padding:5px;">second text for second span</span>
</div>
</body>
</html>
edit:
I need them next to each other, but when I resize the screen I want the whole div to break the line, thanks
You can use nowrap:
span{
white-space: nowrap;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With