By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,767 Members | 1,255 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,767 IT Pros & Developers. It's quick & easy.

Style Sheet Methods--Which Do You Use?

P: n/a
I'd like to do a bit of a survey and get people's opinions.

There are a number of methods of adding CSS to your documents.

The first choice is whether to put them in the page, or remotely.

Let's assume that everyone uses remote style sheets, which make
websites much easier to maintain.

Let's also assume that everyone has problems with Netscape 4, which I
don't think is unfair.
So this leaves us with the following approaches:

1) A single remote stylesheet via a LINK tag, marked MEDIUM="ALL" to
hide it from Netscape 4.

2) Two or more remote stylesheets via LINK tags, one marked
MEDIUM="ALL" to hide it from Netscape 4, the other(s) not.

3) A single remote stylesheet via a LINK tag, with some of the content
hidden from Netscape 4 with Netscape-bug-exploiting comments.

4) A single remote stylesheet via a LINK tag, plus a STYLE section
containing one or more @IMPORT statements.

5) A single remote stylesheet via a LINK tag, the remote stylesheet
containing one or more @IMPORT statements.

Have I covered all the possibilities?

What I'd like to know is which approach you use, and why?
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Els


Hostile17 wrote:
I'd like to do a bit of a survey and get people's opinions.

There are a number of methods of adding CSS to your documents.

The first choice is whether to put them in the page, or remotely.

Let's assume that everyone uses remote style sheets, which make
websites much easier to maintain.

Let's also assume that everyone has problems with Netscape 4, which I
don't think is unfair.
So this leaves us with the following approaches:

1) A single remote stylesheet via a LINK tag, marked MEDIUM="ALL" to
hide it from Netscape 4.

2) Two or more remote stylesheets via LINK tags, one marked
MEDIUM="ALL" to hide it from Netscape 4, the other(s) not.

3) A single remote stylesheet via a LINK tag, with some of the content
hidden from Netscape 4 with Netscape-bug-exploiting comments.

4) A single remote stylesheet via a LINK tag, plus a STYLE section
containing one or more @IMPORT statements.

5) A single remote stylesheet via a LINK tag, the remote stylesheet
containing one or more @IMPORT statements.

Have I covered all the possibilities?
No :-)
What I'd like to know is which approach you use, and why?


I use a single remote stylesheet via @import, and might have
a few basic things for NN4 in a remote stylesheet via a LINK
tag.
Why remote: 'cause I have more than one html file.
Why the lot via @import: so that NN4 can't see it, and I
don't have to keep paying attention to what all different
styles do to NN4's presentation.
Why a few styles via LINK: so that NN4 will have a little
bit more style than just plain black text on white background.
--
Els

Mente humana é como pára-quedas; funciona melhor aberta.

Jul 20 '05 #2

P: n/a
Hostile17 wrote:
There are a number of methods of adding CSS to your documents.

assume that everyone has problems with Netscape 4
That's usually true. NS4 causes too many problems to be bothered with,
imho. I now do what many others do, provide valid html 4 with no styling
at all. NS 4 users can access all of the content of my site, although
there isn't anything pretty there.

How one hides it is a matter of taste. I link a stylesheet via the LINK
element; that stylesheet contains only an @import statement which
imports my real stylesheet.
stylesheet via a LINK tag, marked MEDIUM="ALL"
media="all" (use the Latin plural, which is now an English singular or
plural noun)
Have I covered all the possibilities?


No, there are others.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #3

P: n/a
Brian <us*****@julietremblay.com.invalid> wrote in message news:<bm7_b.243349$U%5.1560445@attbi_s03>...
stylesheet via a LINK tag, marked MEDIUM="ALL"


media="all" (use the Latin plural, which is now an English singular or
plural noun)


How silly of me, yes thanks for pointing that out.
Have I covered all the possibilities?


No, there are others.


Well call me argumentative but -- which? Please let me/us know. I
couldn't think of any.

And please, anyone else, join in. I was hoping to get a lot of
opinions on this.
Jul 20 '05 #4

P: n/a
On 23 Feb 2004 17:17:59 -0800, ho*******@yahoo.com (Hostile17) wrote:
Brian <us*****@julietremblay.com.invalid> wrote in message news:<bm7_b.243349$U%5.1560445@attbi_s03>...
> stylesheet via a LINK tag, marked MEDIUM="ALL"


media="all" (use the Latin plural, which is now an English singular or
plural noun)


How silly of me, yes thanks for pointing that out.
> Have I covered all the possibilities?


No, there are others.


Well call me argumentative but -- which? Please let me/us know. I
couldn't think of any.

And please, anyone else, join in. I was hoping to get a lot of
opinions on this.


I really don't think it matters much. I use one stylesheet via LINK and
one via @import in a STYLE element, but I wouldn't attribute much
significance to that fact.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.