View Full Version : Rules on linking a CSS file
Burgin
12-19-2008, 02:14 PM
What are the rules for linking a CSS file to a html page. I've linked more than one CSS file before with no problem but this time it's only only linking to the last one. Here's what I'm coding...
<link href="../assets/css/main990.css" rel="stylesheet" type="text/css">
<link href="../assets/css/mapguide.css" rel="stylesheet" type="text/css">
main990.css works fine on its own but as soon as I introduce mapguide.css, it looses it.
Is it because my DOCTYPE is HTML 4.01 Transitional?
Anyone know what I'm doing wrong?
Snookerman
12-19-2008, 02:57 PM
main990.css works fine on its own but as soon as I introduce mapguide.css, it looses it.
What exactly do you mean by "looses it"? Looking at the code you posted there shouldn't be any problem. Could you post a link to your site?
jscheuer1
12-19-2008, 04:54 PM
The rules are basically whatever comes last has the last word. So if something in mapguide.css contradicts something in main990.css, then mapguide.css will 'win'. But if there are no conflicting styles, the two stylesheets should work together just fine.
Burgin
12-21-2008, 06:30 AM
Thanks both, you were right there's nothing wrong with the link code, I was having a blonde moment, well grey actually.
jscheuer1
12-21-2008, 04:02 PM
Thanks both, you were right there's nothing wrong with the link code, I was having a blonde moment, well grey actually.
The proper spelling (for css style) is gray. :)
Snookerman
12-21-2008, 04:59 PM
The proper spelling (for css style) is gray. :)
:) That is probably the first thing I would change if I became "king of coding". The second would be the favicon issue..
Schmoopy
12-21-2008, 11:11 PM
English spelling > American spelling.
If only the creators of CSS / HTML standards had been English :(
Snookerman
12-21-2008, 11:36 PM
English spelling > American spelling.
If only the creators of CSS / HTML standards had been English :(
I'm not sure I agree with that, as long as they went with "favorite" and "color" they might as well go all the way with the American to be consistent. The thing is though, most Americans spell it "grey" so they chose the most uncommon spelling for it.
Schmoopy
12-22-2008, 03:58 AM
I was under the opinion that "Gray" was more common in American speaking countries and that "Grey" was only really used here in the UK.
jscheuer1
12-22-2008, 04:48 AM
Some browsers will accept grey as the color gray, others will not. They all accept gray. I always thought that gray was a color and that Grey was a person's name. But, as I say, I just thought that. I never really looked into it.
Snookerman
12-22-2008, 08:41 AM
Well, grey is a colour and gray is a color :) however, I know from personal experience that the British spelling is used in several parts of the US.
jscheuer1
12-22-2008, 10:20 AM
In the US, grey is considered a variant, I just looked it up. That explains why some browsers (notably good old US of A's MS) don't recognize it as a valid color.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.