Removing links added when printing bootstrap pages

When printing a bootstrap3 themed webpage, you will notice that the URL of all the links are printed as well. For example,

This is a feature by bootstrap design, but it might not be desirable in most scenarios. To remove this, you need to add the below CSS on top of your bootstrap.css:

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

Note that the !important declaration will be necessary.


AI Summary AI Summary
Chrome On-device AI 2025-05-01 01:05:05

Share Share this Post