If I want to provide alternate stylesheets (eg red.css, green.css), is
it better to put all the stuff that is common to both sheets in a
separate css file (eg basic.css) and use @import at the top of each
alternative?
Does basic.css get downloaded each time the style is changed, or just
once (with the first view)?
Does it matter? - Is there another way? -
-- te****@ban.arg. nh
Email addy ROT13'd 5 2413
On Sun, 24 Apr 2005 01:15:27 +0000, User wrote: If I want to provide alternate stylesheets (eg red.css, green.css), is it better to put all the stuff that is common to both sheets in a separate css file (eg basic.css) and use @import at the top of each alternative?
That's one of the things that I do.
Does basic.css get downloaded each time the style is changed, or just once (with the first view)?
If the server and client are set up right, they fetch what they need once,
and use their cache. If they're set up badly, they may fetch over and
over, though I've not seen that. I have seen those that check whether
they should fetch it each time. Though, again, that seems due to poor
settings.
Even MSIE gets it half right. It only downloads the files it needs once
(i.e. your included one in several alternate stylesheets). But it does
download all of your stylesheets, even though it doesn't support using
alternate stylesheets.
Does it matter? - Is there another way?
Probably not, and yes. Though I don't think that anything is going to be
any better.
--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.
This message was sent without a virus, please delete some files yourself.
Tim wrote: On Sun, 24 Apr 2005 01:15:27 +0000, User wrote:
If I want to provide alternate stylesheets (eg red.css, green.css),
The default Xaraya cms install, includes different theme style sheets,
they are all included, and are selected by an "on click" javascript
action when the colour button is clicked. If your user has js disabled
they will still get the default css.
User wrote: If I want to provide alternate stylesheets (eg red.css, green.css), is it better to put all the stuff that is common to both sheets in a separate css file (eg basic.css) and use @import at the top of each alternative? Does basic.css get downloaded each time the style is changed, or just once (with the first view)? Does it matter? - Is there another way? -
You could use basic.css as a *persistent* style sheet, red.css as a
*preferred* style sheet and green.css as an *alternate* style sheet.
<link rel="stylesheet " type="text/css" href="basic.css ">
<link rel="stylesheet " type="text/css" href="red.css" title="Red">
<link rel="alternate stylesheet" type="text/css" href="green.css "
title="Green">
14.3 External style sheets; "HTML 4.01 Specification";
W3C Recommendation; 24 December 1999;
<http://www.w3.org/TR/REC-html40/present/styles.html#h-14.3>
--
Steve
Everywhere is walking distance if you have the time. -Steven Wright
User wrote: If I want to provide alternate stylesheets (eg red.css, green.css), is it better to put all the stuff that is common to both sheets in a separate css file (eg basic.css) and use @import at the top of each alternative? Does basic.css get downloaded each time the style is changed, or just once (with the first view)? Does it matter? - Is there another way? -
There is no sense in repeating the same declarations several times and
the download is only once, so it makes good sense. Since not all
browsers support alternate stylesheets, you may wish to consider another
method. With just a little script and only one stylesheet you can change
classes and effectively provide alternate styles rather than alternate
stylesheets. Here is an example: http://www.home.golden.net/~richterf...4_Opera_1.html
Disregard the floating box which describes an Opera redraw bug.
--
Gus
In article <TY************ ********@golden .net>, gu********@nets cape.net
says... User wrote:
<snip> Does basic.css get downloaded each time the style is changed, or just once (with the first view)? Does it matter? - Is there another way? -
<snip> ... With just a little script and only one stylesheet you can change classes and effectively provide alternate styles rather than alternate stylesheets. Here is an example: http://www.home.golden.net/~richterf...4_Opera_1.html Disregard the floating box which describes an Opera redraw bug.
Thanks Gus, I'll study that. That Opera redraw bug is still there in
v8.0.
-- te****@ban.arg. nh
Email addy ROT13'd This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Geoff Cox |
last post by:
Hello,
I publish some web pages using large fonts and would like to give the
user the opportunity to print the pages using a smaller font.
I believe that this is possible using different style sheets? I am not
clear how the user would select the different .css files?
Seems to be easier than having duplicate html files ...
|
by: Phil Thompson |
last post by:
does it matter in which order i place different style sheets
i.e.
<link rel="stylesheet" type="text/css" media="screen"
href="style/screen.css" />
<link rel="stylesheet" type="text/css" media="print" href="style/print.css"
/>
is this better than this
<link rel="stylesheet" type="text/css" media="print" href="style/print.css"
|
by: Toby A Inkster |
last post by:
www.authoring.stylesheets]
For ages I have provided links to alternate stylesheets from my pages as
per W3C recommendations:
<link rel="stylesheet" href="baz" type="text/css" title="Baz"
media="screen,projection" />
<link rel="alternate stylesheet" href="foo" type="text/css" title="Foo"
media="screen,projection" />
<link rel="alternate stylesheet" href="bar" type="text/css" title="Bar"
|
by: relaxedrob |
last post by:
Hi All!
I have a page with with the following style information:
<link rel="stylesheet" type="text/css" href="/eEmployment/eTech.css"
/>
<style type="text/css">
DIV.Application {
BACKGROUND-IMAGE:url(/someImage.jpg);
}
|
by: Eric Lindsay |
last post by:
I am trying to understand the differences between and uses of
persistent, default and alternate styles. I have read
http://www.w3.org/TR/REC-html40/present/styles.html section 14.3.2 on
specifying external style sheets in link using combinations of rel and
using or not using the title attribute.
I think I sort of understand rel="alternate stylesheet". It seems to be
able to act something like the media="print" or media="handheld" or...
| |
by: Jarno Suni |
last post by:
I want a device to use styles given for media type handheld and not the
styles given for media type screen, if the device supports media types
handheld and screen. Is it possible without writing all styles specified
for screen again for handheld?
--
Homepage http://www.iki.fi/jarno.suni/
|
by: Radium |
last post by:
Cascading Style Sheet is an extreme hazard to your privacy. It
allows others on the internet to see your monitor and files. It allows
them to copy images on your monitor to their computers. It also allows
them to copy files from your computer to their's. It is dangerous.
Avoid at all costs.
CSS that isn't stored in the victim's computer. Instead it is stored in
the perpetrator's PC. What it does is it reads everything on the
victim's...
|
by: mscertified |
last post by:
Can anyone explain how references to style sheets work, I've exhausted
looking in help, its all so confusing. I have three style sheets in my
project under 'Style Sheets'. Only the first style sheet seems to work. If I
refer to a class in one of the other two, I do not get the formatting. Why?
How do these style sheets work if I also refer to external style sheets and
how do I refer to multiple external style sheets? Should I be using...
|
by: =?Utf-8?B?SmVycnkgQw==?= |
last post by:
I have a machine running IIS 6.0. I just replaced the web.config and several
aspx pages in the application and now the style sheets are not working. the
images from the themes work but not the css files.
Any help.
--
Jerry
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |