HighDots Forums  

Re: your thoughts on applying multiple stylesheets to a page

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: your thoughts on applying multiple stylesheets to a page in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ian Hobson
 
Posts: n/a

Default Re: your thoughts on applying multiple stylesheets to a page - 02-28-2008 , 05:34 PM






William Gill wrote:
Quote:
I have a main stylesheet that I apply to all pages in a site, they each
sub-section has a subsection stylesheet that either overrides or applies
new style to pages in that subsection, then finally each page in a
subsection may need even more fine tuning.

In the past I would use <link href="page.css" rel="stylesheet"
type="text/css">, then in page.css I would import section.css, and
section.css would import main.css.

I am looking at changing to multiple link tags like:
link href="main.css" rel="stylesheet" type="text/css"
link href="section.css" rel="stylesheet" type="text/css"
link href="page.css" rel="stylesheet" type="text/css"

Assuming I am careful to consider the cascade, is there anything I
should be careful of using this method to apply multiple stylesheets?
The issue with multiple stylesheets, is that each one has to be fetched.
three links will give the browser the opportunity to fetch them in
parallel, will help some, but the overhead is still heavy.

Include the page stuff in the page or into the session file.

Then probably use one link to the section css file which would contain
the main.css stuff repeated for each.

If the main is large and the section one tiny I might use two links, but
I prefer to use one. That way I can see it all the CSS in one place.

The overhead of sending css to the browser that is not used in a page,
is tiny, if the css is reused in later pages.

Quote:
Also, what are the implications of using or not using a common title
attribute?

What? The title attribute provides text that appears as a tool tip to
the user, for various durations, in some browsers, and not at all in
other browsers. Not a CSS issue.

Regards

Ian



Reply With Quote
  #2  
Old   
Bergamot
 
Posts: n/a

Default Re: your thoughts on applying multiple stylesheets to a page - 02-28-2008 , 06:01 PM






Ian Hobson wrote:
Quote:
The overhead of sending css to the browser that is not used in a page,
is tiny, if the css is reused in later pages.
Agreed. Caching is A Good Thing.

--
Berg


Reply With Quote
  #3  
Old   
Bergamot
 
Posts: n/a

Default Re: your thoughts on applying multiple stylesheets to a page - 02-28-2008 , 09:55 PM



William Gill wrote:
Quote:
Ian Hobson wrote:

What? The title attribute provides text that appears as a tool tip

Actually use of the title attribute designates a stylesheet as
preferred.
You didn't make it clear you were referring to the stylesheet title. I
also read your original question as a more general inquiry about the
title attribute.

Quote:
I did
read something about setting title to the same value in several link
elements combines the sheets into one,
Yes, that's true.

Quote:
which might impact the cascade,
but it's not obvious to me how or if it really does.
It does. All stylesheets with the same title are considered one, so
cascading does happen. IE doesn't support alternate stylesheets, of
course, but other browsers do.

--
Berg


Reply With Quote
  #4  
Old   
Andreas Prilop
 
Posts: n/a

Default Re: your thoughts on applying multiple stylesheets to a page - 02-29-2008 , 08:33 AM



On Thu, 28 Feb 2008, William Gill wrote:

Quote:
I did read something about setting title to the same value
in several link elements combines the sheets into one,
which might impact the cascade, but it's not obvious to me
how or if it really does.
See http://www.unics.uni-hannover.de/nht...nnotation.html
for an example.

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sear...Alan.J.Flavell


Reply With Quote
  #5  
Old   
Andreas Prilop
 
Posts: n/a

Default Re: your thoughts on applying multiple stylesheets to a page - 02-29-2008 , 08:37 AM



On Thu, 28 Feb 2008, Ian Hobson wrote:

Quote:
The title attribute provides text that appears as a tool tip to the
user, for various durations, in some browsers, and not at all in other
browsers. Not a CSS issue.
LINK can have a TITLE attribute;
see http://www.htmlhelp.com/reference/cs...-html.html#ex1

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sear...Alan.J.Flavell


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.