Prevent linebreak after </div>

Viewed 205118

Is there a way to prevent a line break after a div with css?

For example I have

<div class="label">My Label:</div>
<div class="text">My text</div>

and want it to display like:

My Label: My text

13 Answers

try this (in CSS) for preventing line breaks in div texts:

white-space: nowrap;
Related