<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

[css]
br:before {
content: “”;
}[/css]

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.

Speak Your Mind

*