How to remove href values when printing in Chrome ? CSS Print Styles

If you are using twitter bootstrap and print a web page suing Google chrome, you will see href values of  links. If you don’t want href values in print then you will have to disable them in CSS.

Here is an example.

For this html:

<a href="">Google</a>

It prints:

Google (

And you want it to print:


Bootstrap does the same thing.

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

Just remove it from there, or override it in your own print stylesheet:

@media print {
  a[href]:after {
    content: none !important;

It doesn’t. Somewhere in your print stylesheet, you must have this section of code:

a[href]::after {
    content: " (" attr(href) ")"

Tagged: , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: