ElDiabolo ElDiabolo - 3 months ago 15
CSS Question

CSS Content - Line break

I want to do a line break with CSS. I´m using content.

td:before {
content: "Test\A Test2";
}


It´s not working.
How to do it correctly?

Answer

You must add white-space:pre;

Example

.linebreak:after{
    content:"A" '\A' "B";
    white-space: pre;
}
<div class="linebreak"></div>

Comments