3

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?

asked Oct 23, 2015 at 11:09

1 Answer 1

10

You must add white-space:pre;

Example

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

answered Oct 23, 2015 at 11:44
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.