473,657 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Style Sheet Methods--Which Do You Use?

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
4 1597
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
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
Brian <us*****@juliet remblay.com.inv alid> wrote in message news:<bm7_b.243 349$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
On 23 Feb 2004 17:17:59 -0800, ho*******@yahoo .com (Hostile17) wrote:
Brian <us*****@juliet remblay.com.inv alid> wrote in message news:<bm7_b.243 349$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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2008
by: Mark | last post by:
Hi - I want to allow users of an intranet application, to select their own colours etc. So I have a tbale in my database, which has fields called bgcolour, fontcolour etc. As I want all pages to get the users colours, I have an includes file at the top of each page: <!--#include file="userconfig.asp" --> This is:
19
15600
by: Roger | last post by:
How can I pass parameters to a style sheet? I have noticed a couple of sites are now passing variables to the style sheet, which appear to be substituted at run time. For example: <link rel="stylesheet" type="text/css" href="mystyle.css?color=ffffff"> I have seen references in my temp Internet file directory that indicates this is possible, but I can't find any documentation how to do it.
5
1970
by: Andrew Poulos | last post by:
If I have an external stylesheet that is @imported into my page and it has an element that looks like this: * html td { font-style: italic; } how can I use javascript to change the font style to 'normal'? Andrew Poulos
33
2493
by: amerar | last post by:
Hi All, I can make a page using a style sheet, no problem there. However, if I make an email and send it out to my list, Yahoo & Hotmail totally ignore the style tags. It looks fine in Netscape though..... Question: I've tried linking & embedding the style tags with no luck. How can I use them inline? I've read that inline style sheets is the way to go if you want them to work in most email clients.......
7
10893
by: Don Wash | last post by:
Hi There! I'm creating several ASCX Controls and those controls will have their own CSS Style Sheets. But I don't know how I can link the corresponding Style Sheet in the ASCX file? Because the style sheet can only be linked in the <head></head> section of an HTML document, right? So ASCX controls does not have <head> tags so how can I link the style sheets? Many thanks in advance! Don
3
1783
by: Chris | last post by:
Hi I have another style sheet question: We effectively have a page that has two text boxes on it. We would like one text box to be in one style and the other text box to be in another style. The problem is we would like the user to be able to control the styles using style sheets. Is there anyway around this without hard coding the styles into the page?
1
1659
by: Looch | last post by:
Hi All, I have a need for a user to open an XML file from a web site and have it open based on a style sheet, not just looking at the raw XML data. I'm wondering what the best way to go about this is... Do I download the style sheet to every PC that navigates to the web site in question? Would this use ActiveX?
1
1858
by: abaybas | last post by:
I'm creating a page in which a certain "content" part of the page is refreshed using ajax. I do this by using a div#content, and it's child div#container. the code: ... // clean container first var container = document.getElementById("container") container.parentNode.removeChild(container);
7
1644
Stang02GT
by: Stang02GT | last post by:
I am running into a problem with a style sheet for my menu and the style sheet on my web page. The style sheet for the web page is over riding some of the items of my menu sheet. Is there any way i can stop this and exclude my menu from being styled by the web page sheet?
4
5630
Frinavale
by: Frinavale | last post by:
So a while ago I created a Tab Strip Control (before the AjaxToolkit had theirs otherwise I would have probably just used theirs). When I looked at the AjaxToolkit control to see how they got around this problem I discovered that they're using Animations. I don't want to bloat my control with the Ajaxtoolkit's Animation stuff though. I guess I should tell you what the problem is. I have a TabStrip custom control. It's a Table that has...
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8516
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.