Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Firefox, when printing a page with anchor tags, the link location is printing after the text

For example,

<a href="../somepage/page.aspx?qs=asdf">Text Here</a>

will print out as...


Text Here(../somepage/page.aspx?qs=asdf)


In IE, it looks normal (doesn't print the url). Any ideas why this is acting in this fashion?

like image 964
Brett Avatar asked Jan 29 '10 15:01

Brett


People also ask

How do you remove hyperlinks when printing?

Google Chrome: Go to the Menu icon in the top right corner of the browser and Click on Print button. Uncheck the “Headers and footers” option underneath the “Margins” option. Apple Safari: Go to the print option from the menu and the Print dialog appears. Uncheck the “Print headers and footers” option.

What is the anchor tag to link to another page?

<a>: The Anchor element. The <a> HTML element (or anchor element), with its href attribute, creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a URL can address. Content within each <a> should indicate the link's destination.

What is an anchored link?

An anchor tag, or anchor link, is a web page element that links to another location on the same page. They are typically used for long or text-heavy pages so that visitors can jump to a specific part of the page without having to scroll as much.


1 Answers

Extrapolating from Brett's answer, on Firefox 25, this CSS style removes the offending href:

@media print {
    a:link:after,
    a:visited:after {
        content: "" !important;
    }
}
like image 165
Steve Eynon Avatar answered Oct 11 '22 00:10

Steve Eynon