Previous Message
Next Message

[css-d] print media question

Sent by David Cantrell on 30 September 2002 20:08


I'm a newbie to print stylesheets, so please bear with me... :(

Given a series of linked stylesheets, does it matter where the print
stylesheet appears in the list?

E.g. given the following:

	<link rel="stylesheet" href="foo.css" media="screen"/>
	<link rel="stylesheet" href="print.css" media="print"/>
	<link rel="stylesheet" href="bar.css" media="screen"/>

And given an element with an id of "fnord"...

	[foo.css]
	#fnord { display: block; }
	
	[print.css]
	#fnord { display: none; }

	[bar.css]
	#fnord { display: inline; }

Is there any reason for the browser to use the bar.css style in the print
stylesheet? I'm thinking no, since they specify different media, but just
wanted to check with the experts.

Also, if I don't specify a media, does it default to "all"? And will this
affect the print stylesheet?

Many thanks in advance! :)
-dave
Previous Message
Next Message

Message thread: