Tuesday, February 22, 2011

Link Problem using Blueprint with CFWheels

I've started incorporating the Blueprint CSS framework in CFWheels and am running into a few little quirks. The first was after including the css files, all my links where showing the link following by the full path of the link in parentheses.
I finally figured out the problem was in the print.css file on (as of this version) line 29.
The css was:
a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;}

I didn't even realize you could add the full link with css!
Anyway, commenting out the line does the trick without any other adverse effects that I see yet.

3 comments:

Anonymous said...

It's the print css file - not designed for on screen use.

You have to do two styleSheetLinkTag() calls, and remember to specify media="print": see http://cfwheels.org/docs/1-1/function/stylesheetlinktag

Anonymous said...

Are you specifying media="print" when including print.css?

It would look something like this:
#styleSheetLinkTag(source="blueprint/print", media="print")#

That tells the browser to only load the stylesheet when the user is printing the page using File > Print or CTRL+P. In that context, displaying the entire URL is useful since people reading from paper can't click the links. :)

CS said...

Neokoenig, Chris - thanks. I didn't have the media specified on the styleSheetLinkTag.
That corrected it.