URL showing on links when printing a page

5,602 views
Skip to first unread message

Auden RovelleQuartz

unread,
Jun 20, 2011, 11:10:47 AM6/20/11
to web2py-users
on my application, the display on my screen looks fine as expected;
but when I print the page or do a "print preview" operation, the path
URL shows up to the right of every hyperlink

why is this and how do I avoid that behavior?

many thanks

Anthony

unread,
Jun 20, 2011, 11:32:07 AM6/20/11
to web...@googlegroups.com
I think that's probably an issue with your CSS. Your CSS may include a special "print" stylesheet that displays the URLs next to the links when the page is printed -- the idea is that when you print a document with hyperlinks, you might want a way to see the URLs behind the links (since they can't be hovered or clicked). You'll probably have to edit your CSS if you don't want that to happen.
 
Anthony

Anthony

unread,
Jun 20, 2011, 11:39:05 AM6/20/11
to web...@googlegroups.com
I didn't realize the base.css file that comes with the web2py 'welcome' app does this (I was viewing it in IE, and the URL printing doesn't work in IE). The line of CSS to remove is near the bottom of /static/css/base.css in the "print styles" section:
 
  a:after { content: " (" attr(href) ")"; }
 
Anthony

Auden RovelleQuartz

unread,
Jun 20, 2011, 11:56:53 AM6/20/11
to web2py-users
Thanks, that did work!
> >> many thanks- Hide quoted text -
>
> - Show quoted text -

Matt Gorecki

unread,
Jun 20, 2011, 11:22:23 AM6/20/11
to web2py-users
My Google searches didn't yield much information.

There is a CSS trick that will show the URLs only when the page is
printed. Maybe you have something like this in your stylesheets:
http://davidwalsh.name/optimize-your-links-for-print-using-css-show-url

The only other thing I can think is it's a printer setting in your
browser.

Matt
Reply all
Reply to author
Forward
0 new messages