When I print a page from my Bootstrap-themed site, all the links (and images with attached urls) have a printed representation of the link inserted into the printed page, right after the linked object. I can see some situations where this would be helpful, but for now it's just messing up my printed layout. I smell jQuery at work here, but I can't figure out where it is or how I can turn it off. Any hints out there? Thanks!

  • 1
    FWIW: is Bootstrap related; not specific to Drupal nor jquery. Commented Sep 2, 2015 at 12:06

1 Answer 1


Found it: it wasn't jQuery, but CSS3. Down in bootstrap.css, we find:

@media print {
  a[href]:after {
    content: " (" attr(href) ")";

Overriding the style with content:none handles the situation fine. There are some similar :after clauses in there doing similar things, but this is working for now.

  • FYI, I first read this as hand-modifying bootstrap.css, which I was reluctant to do. Of course it isn't saying that: "overriding the style" just means putting a new definition in one's own style sheet, that is loaded after the bootstrap one. Probably obvious to most people, but I mention this in case anyone else has the same mis-interpretation I did. Commented Sep 2, 2015 at 13:18
  • This odd design choice has been "fixed" in bootstrap 4.
    – BM5k
    Commented Jan 6, 2016 at 3:44

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.