I'm invoking the navigator print function using a simple window.print(); call. It prints perfect (I want to print the same I see on the screen, so I don't really use a special CSS to print) but it showing the link locations next to the text link, something like:
Homepage (http://localhost)
To be clearer: I don't want to have the link locations near the links in the printed version, I have control over the CSS but I can't find this behaviour defined anywhere, so I think is a navigator-related issue!
EDIT: This happens under Firefox 3.6.8 and the last Chrome, on Ubuntu an Windows XP/Vista.
Seems you are printing a page with this styling from a CSS2 compliant browser
http://www.alistapart.com/articles/goingtoprint/
So to avoid additional print-out of link information in a printed web page, add the following rules to the
@media print
section:This will remove the ugly link information like
Homepage (http://localhost)
and reduce it toHomepage
. You may of course add rules to avoid it only in the text section (or only in the navigation, but you shouldn't display navigation in the print-out format of your web page.I found the mentioned CSS and removed it but it did not help, and I couldn't find it anywhere else in the project so I used jQuery to remove the links but still retain the text.
More info here Remove hyperlink but keep text?
Adding this will help you to remove those unwanted links
Reading this will help
content: ""; does not work I use this:
This works to disable!
My app server (rails) required me to use a parent selector. The
body
element is perfect for selecting what should be the entire page.