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 Answer
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. Sep 2, 2015 at 13:18
-