WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: CSS linking

for

From: Philip Pawley
Date: Mar 14, 2002 2:47PM


Leo,

>However, I am wondering if this is the case, or whether using that
>nifty NON-NS4 technique (media="screen, print") as well as a print
>media only sheet would work well together.

1. I think the extra print media sheet should work well with my proposed arrangement. I can't see why it shouldn't.

2. I prefer to put my print rules at the end of my non-NS4 sheet like so:-
@media print { body { background:white; } }
I don't know whether the linked style sheet for printing only might create problems for somebody trying to print the page while off-line. Would all browsers call for the sheet when the page was requested, or would some wait until the user tried to print it? I don't know.

3. You could always use a different media definition. .. media="screen,projection" .. for instance.

-----------------------------------------------------

I would like to share a few other smaller tips. *Please* let me know if you know of any problems with these in other platforms than windows.

1. Internet Explorer does not yet use this type of selector, so this rule would only be applied in Opera 4+ and Netscape 6:
div[width="whatever"].someclass { width:30px; }

2. IE4 thinks it understands
div[width].someclass { width:30px; } and will apply it as though it were this rule:
div.someclass { width:30px; }
So, if you use an attribute that is *not* specified in the tag in question, *only IE4* will apply the rule.

3. IE4 and IE5 do not apply case sensitivity to classes and id's. So, if you have a tag <.div class="someclass"> , this rule:
div.someClass { width:30px; } will be applied to that tag by IE4 and IE5 but, of course, not by IE6, NS6, Opera or WebTV.
[Note. Dot added to tag to avoid confusing the email program]

Please share any other such tips you may know of. (I would particularly like to know of any way of applying a rule *only* in IE6).

All the best,

--
Philip Pawley
Liverpool, UK
http://www.alexanderworks.org/
--





----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/