Search code examples
cssprintingprint-style

Print CSS URL on new line


For print styles, I am currently printing the url after the text. Is it possible to have it appear on the next line instead of next to the text? This is what I have so far.

a:after {
  content:" (" attr(href) ")";
}

Result:

Email me(hello@email.com)

Want this instead:

Email me

(hello@email.com)

Example: http://jsfiddle.net/qesRk/


Solution

  • Try this -

    a:after {
        font-style: italic;
        content: "\A and some text after."; white-space:pre;
    }
    

    Demo