Keith Purtell wrote:
Say I have a decent external style sheet that works for 85% of my site
visitors.
This sounds like you have designed a style sheet that assumes some CSS
support and you estimate that 85% of visitors use browsers that have such
support. This would be much easier if you specified your assumptions more
concretely. This is really about some oldish versions of IE, isn't it?
Then I decided that the selector for one item used
throughout the site -- paragraph (p) for example -- needs to have a
completely different set of properties and values for the remaining
15% of visitors.
But how do you expect your style sheet to work in general for this 15%? Is
this really about the use of some particular CSS constructs (which?) that
you expect to cause problems to IE... I mean in some browsing situations?
Perhaps so that all the rest works ok for them?
It might be better to discuss the specifics of what you are trying to
achieve.
If I put a conditional comment (a simple "if")
There are no conditional comments in CSS. This sounds like you consider
using certain pseudo-comments in HTML in order to feed some <style> or
<link> elements to some versions of IE while keeping them technically as
comments to other browsers.
for the 15% in the
head, just below the call for my external style sheet, and include
this completely different paragraph style within, will it override
the one defined in the external sheet?
This depends on the cascade as a whole. In particular, it depends on the
specificity of selectors used. And, in particular, setting some CSS rules
for p elements does not magically override other CSS rules for p elements.
If the external style sheet has some property setting that applies to an
element, then it can only be overridden by setting a specific value to that
property.
Or do I need to instead have my conditional comment be an "if or" that
calls up the main style sheet for the majority of visitors and a
variant of the main style sheet with the alternate paragraph style?
I wonder how you intend to implement an "if or". In any case, CSS has no
"if" construct, even a simple "if".
--
Yucca, http://www.cs.tut.fi/~jkorpela/
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/