<br> not causing a line break

Abstract

The text in the next paragraph has a line break where indicated. By using CSS to alter the browser default styles associated with this element, the line break can be avoided. This is obviously illogical, but shows what could be done. Only works in Opera 7+.

Example

This sentence has a <br> element at the end of it ?.
See how the line doesn’t break in Opera 7+?

Code

br:before {
content: "";
}

Conclusion

With the right browser support, stopping an element that inherently breaks lines, to not cause a line break is possible. As mentioned previously though, this is illogical, and exists only as a proof of concept to show what could be done.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Twitter Users!
Sign in with your Twitter account by clicking the button below.