473,396 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ordering of different style sheets, is it important?

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"
/>
<link rel="stylesheet" type="text/css" media="screen"
href="style/screen.css" />

I ask because when viewing the a site in the browsers it doesn't seem to
matter but when editing the page in dreamweaver it displyas only my print
stylesheet so editing the site is difficult.

Phil
Jul 20 '05 #1
3 3174


"Phil Thompson" <ph**@xweb.freeserveSPAM.co.uk> wrote in message
news:bk**********@news6.svr.pol.co.uk...
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" />
<link rel="stylesheet" type="text/css" media="screen"
href="style/screen.css" />

I ask because when viewing the a site in the browsers it doesn't seem to
matter but when editing the page in dreamweaver it displyas only my print
stylesheet so editing the site is difficult.

Phil

Specificity moves upwards; styles defined in code have a higher priority
than styles written inline, which have a higher priority than linked or
imported styles. Where more than one stylesheet is linked or imported, the
one lower down in the code has the higher priority. You still have to watch
inheritance, and (I believe) some version 4 browsers ignore a rule totally
where there is a conflict in two different style sheets.

None of which, of course, answers your question! The real answer, assuming
you use Dreamweaver MX, is to look in the Dreamweaver help for 'Using Design
Time style sheets'.

HTH,

Pete.
--

Derby
UK
Jul 20 '05 #2
"Phil Thompson" <ph**@xweb.freeserveSPAM.co.uk> wrote:
does it matter in which order i place different style sheets


In general it does, since the order of rules is relevant in the cascade.
But in your case it does not, since the two <link> elements have different
and mutually exclusive media attributes. In any given situation, at most
one of the style sheets is used by the browser.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #3
In article <bk*******************@news.demon.co.uk> in
comp.infosystems.www.authoring.stylesheets, Peter Connolly
<no*************@nospamrequired.com> wrote:
Specificity moves upwards; styles defined in code have a higher priority
than styles written inline, which have a higher priority than linked or
imported styles. Where more than one stylesheet is linked or imported, the
one lower down in the code has the higher priority. You still have to watch
inheritance, and (I believe) some version 4 browsers ignore a rule totally
where there is a conflict in two different style sheets.

None of which, of course, answers your question!


Did you miss the fact that the two linked style sheets had non-
overlapping media specifications? In that case I don't think it
makes any difference which order they occur in.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
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...
2
by: Dr. Richard E. Hawkins | last post by:
I've googled around, and asked everyone I know, but I still can't find any reference to anyone else having faced this particular IE bug with floats. I've put a page at...
12
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 {...
12
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...
9
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...
5
by: MarkW | last post by:
I hope this is the correct place to post this: I am developing a web site for a e-commerce business I will be running. The site I'm setting up will be 50% store, 50% content. I'm not sure which...
1
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...
53
by: Jonas Smithson | last post by:
In his book "CSS: The Definitive Guide" 2nd edition (pgs. 116-117), Eric Meyer has an interesting discussion about "font-size-adjust" that was evidently dropped in CSS 2.1 due to browser...
5
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...
0
tracyyun
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...
0
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,...

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.