Kung Fu Kung Fu

Fujian White Crane Kung Fu

Zope Zope

What I have and am doing with Zope

Photos Photos

Photoalbum, both old and new.

Receptsamlingen Receptsamlingen

In Swedish only. About my "Collection of Recipes" website.

Contact me Contact me

My contact details and how to contact me.

  Mobile version of this page Mobile version of this page


 

Don't put title in a <link> tag

css file, media print, print, stylesheet, link tag, title attribute

7th of January 2006

I learnt an important lesson today about the <link> tag. I had a XHTML Strict that looked like this:

 <link rel="stylesheet" type="text/css" media="print"
 
title="Design for print" href="/print.css" />

And every time I tried to print the page it did not correctly incorporate the print.css file. The file gets downloaded by the client but not incorporated. After a lot of trial and errors and testing I finally discovered why. The title attribute stops the link tag from working.

The correct way to declare a link tag for a media="print" is to do the following:

 <link rel="stylesheet" type="text/css" media="print"
 
href="/print.css" />

Hopefully this will help someone else getting into the same pickle as I was in.


Comment

kent - 9th January 2006  [«« Reply to this]
helvete vad tråkig sida. jag kräks. hoppas du hade en trvlig kinatrip. tjock.
 
Name:
Email:
hide my email address.

Your email address will be encoded to prevent email-extraction spiders from reading it so you won't get spammed if you decide to show your email address.