Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Rules on linking a CSS file

  1. #1
    Join Date
    Jan 2006
    Location
    Derbyshire, UK
    Posts
    74
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default Rules on linking a CSS file

    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?

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Quote Originally Posted by Burgin View Post
    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?

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Jan 2006
    Location
    Derbyshire, UK
    Posts
    74
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default Thanks

    Thanks both, you were right there's nothing wrong with the link code, I was having a blonde moment, well grey actually.

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Burgin View Post
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Quote Originally Posted by jscheuer1 View Post
    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..

  7. #7
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    English spelling > American spelling.

    If only the creators of CSS / HTML standards had been English

  8. #8
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Quote Originally Posted by Schmoopy View Post
    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.

  9. #9
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    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.

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •