Is it possible to use newline character in CSS content property to force a line break? Something like:
figcaption:before
{
content: 'Figure \n' + attr(title);
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The content property accepts a string and:
The tricky bit is to remember that HTML collapses white-space by default.
You can check Using character escapes in markup and CSS for reference about the escape syntax, which essentially is:
\20ACmust be followed by a space if the next character is one of a-f, A-F, 0-9\0020ACmust be 6 digits long, no space needed (but can be included)NOTE: use
\00000arather than just\Awhen escaping an arbitrary string, because if the newline is followed by a number or any character from[a-f]range, this may give an undesired result.