External CSS problem

Discussion in 'HTML' started by Thibault, Dec 31, 2003.

  1. Thibault

    Thibault Guest

    Hey all,

    I'm beginning with CSS documents, and I have encountered a big problem. Here
    it is : I have created an html page that calls a css document located in the
    same directory, and have tested it on my Win98 computer with Opera 7,
    Mozilla, Netscape Navigator and Internet Explorer 6. All works fine. Then I
    went on my page with a WinXP computer, IE 6 (same version as above) : the
    css document is not called. I tried to surf on the same page on the same
    computer with Netscape Navigator : it works (so it's not a problem of font -
    I just want Verdana). I tried on a third computer, with Windows 2000 and IE
    5 : it works. I have verified the code with Dreamweaver, there is no major
    bug. So what is wrong with the second computer ? Here is my CSS document :

    <style type="text/css">
    <!--
    body {background-color: #000000; margin-top: 0; margin-left: 0;
    margin-right: 0; marginheight: 0; marginwidth: 0; margin-bottom: 0; text:
    #FFFF00; color: #FFFF00;}

    a:link {color: #FFCC00}
    a:visited {color: #FFCC00}
    a:active {color: #FF3366}

    ..Style1 {
    color: #FFFF00
    font-family: Verdana, Arial;
    font-size: 10pt;
    }
    ..Style2 {
    color: #FF0000;
    font-weight: bold;
    }
    ..Style3 {font-size: 7pt}
    ..Style4 {font-size: 8pt}
    //-->
    </style>

    I have tried to remove <style> and </style>, but nothing happened. I'm
    really upset.
    I'm calling it with this line :
    <LINK rel="stylesheet" type="text/css" href="style3.css">

    Any idea of what is the problem ?

    Thanks !

    Thibault - France
     
    Thibault, Dec 31, 2003
    #1
    1. Advertising

  2. Thibault <> wrote:
    > Any idea of what is the problem ?


    There's many errors in your css, including some missing semicolons and
    invalid properties. Run it through http://www.htmlhelp.com/tools/csscheck/
    to identify all the errors, fix them, then try your code again.
    --
    Michael Wilcox
    mjwilco at yahoo dot com
    Essential Tools for the Web Developer - http://mikewilcox.t35.com
     
    Michael Wilcox, Dec 31, 2003
    #2
    1. Advertising

  3. Thibault

    Thibault Guest

    "Michael Wilcox" a écrit dans le message news:
    > There's many errors in your css, including some missing semicolons and
    > invalid properties. Run it through http://www.htmlhelp.com/tools/csscheck/
    > to identify all the errors, fix them, then try your code again.


    I have made all the corrections suggested by this url, but it still doesn't
    seem to change anything. I have even changed the "16pt" to "16", according
    to what it suggested, and then it still gave me an error on this point,
    saying that a unit identifier is required. Now I'm really, really upset.
     
    Thibault, Dec 31, 2003
    #3
  4. Thibault wrote:
    > I have even changed the "16pt" to "16", according to what it suggested,
    > and then it still gave me an error on this point, saying that a unit
    > identifier is required. Now I'm really, really upset.


    I haven't tried that CSS linter, but I really doubt it told you to make
    your CSS invalid. I'm guessing it told you to use some other unit (maybe
    em) instead of pt and you misunderstood.
     
    Leif K-Brooks, Dec 31, 2003
    #4
  5. In article <bsuv4e$qdr$>,
    "Thibault" <> wrote:

    > Hey all,
    >
    > I'm beginning with CSS documents, and I have encountered a big problem. Here
    > it is : I have created an html page that calls a css document located in the
    > same directory, and have tested it on my Win98 computer with Opera 7,
    > Mozilla, Netscape Navigator and Internet Explorer 6. All works fine. Then I
    > went on my page with a WinXP computer, IE 6 (same version as above) : the
    > css document is not called. I tried to surf on the same page on the same
    > computer with Netscape Navigator : it works (so it's not a problem of font -
    > I just want Verdana). I tried on a third computer, with Windows 2000 and IE
    > 5 : it works. I have verified the code with Dreamweaver, there is no major
    > bug. So what is wrong with the second computer ? Here is my CSS document :
    >
    > <style type="text/css">
    > <!--


    For starters you do not need to have the trappings of HTML in your .css
    file. Get rid of the <style><!-- //--></style>.

    > body {background-color: #000000; margin-top: 0; margin-left: 0;
    > margin-right: 0; marginheight: 0; marginwidth: 0; margin-bottom: 0; text:
    > #FFFF00; color: #FFFF00;}
    >
    > a:link {color: #FFCC00}
    > a:visited {color: #FFCC00}
    > a:active {color: #FF3366}
    >
    > .Style1 {
    > color: #FFFF00


    missed a semi-colon (;) here.

    > font-family: Verdana, Arial;
    > font-size: 10pt;
    > }
    > .Style2 {
    > color: #FF0000;
    > font-weight: bold;
    > }
    > .Style3 {font-size: 7pt}
    > .Style4 {font-size: 8pt}
    > //-->
    > </style>
    >
    > I have tried to remove <style> and </style>, but nothing happened. I'm
    > really upset.
    > I'm calling it with this line :
    > <LINK rel="stylesheet" type="text/css" href="style3.css">
    >
    > Any idea of what is the problem ?
    >
    > Thanks !
    >
    > Thibault - France
    >
    >


    Make the changes I suggest and try again. I wouldn't be surprised if the
    HTML-ish dead-chicken-waving you're doing there (throwing a <style> HTML
    element into a .css file reveals a basic lack of understanding as to
    what HTML and what CSS are and how they interrelate) confused your
    browsers.

    --
    | Andrew Glasgow <amg39(at)cornell.edu> |
    | "The ordinary telegraph is like a very long cat. You pull the tail in New |
    | York, and it meows in Los Angeles. The wireless is the same, only without |
    | the cat." -- Albert Einstein |
     
    Andrew Glasgow, Dec 31, 2003
    #5
  6. Thibault

    Thibault Guest

    "Leif K-Brooks" a écrit dans le message news:
    > I haven't tried that CSS linter, but I really doubt it told you to make
    > your CSS invalid. I'm guessing it told you to use some other unit (maybe
    > em) instead of pt and you misunderstood.


    Yes, I think it was that. I have corrected this little error. But no change
    on the XP computer. I'm starting to think there is a misconfiguration on it,
    but what can prevent a CSS to be called ? If it were a javascript or
    something like this, it could be a problem with the firewall, but it's not a
    javascript. Actually, I have even turned down the firewall (Zone Alarm) and
    Norton antivirus, but nothing changed. That's why I'm really upset.
     
    Thibault, Dec 31, 2003
    #6
  7. Thibault

    Thibault Guest

    "Andrew Glasgow" a écrit dans le message news:

    > Make the changes I suggest and try again.


    Unfortunately, there's no improvement.


    > I wouldn't be surprised if the
    > HTML-ish dead-chicken-waving you're doing there (throwing a <style> HTML
    > element into a .css file reveals a basic lack of understanding as to
    > what HTML and what CSS are and how they interrelate) confused your
    > browsers.


    In facts, my basic CSS had no HTML elements. I read this suggestion on a
    website, and as I had nothing to loose, I tried. Nevertheless, you pointed
    it out : I'm a beginner. That's why I'm here. Not to get negative judgements
    ; only to get help.
     
    Thibault, Dec 31, 2003
    #7
  8. Quoth the raven named Thibault:

    > In facts, my basic CSS had no HTML elements. I read this suggestion
    > on a website, and as I had nothing to loose, I tried. Nevertheless,
    > you pointed it out :


    Hey, Thibault! Happy New Year, and welcome to Usenet! <g>

    Could you give us the URL to your page? If we see it live, someone
    could probably find the reason in a minute or so. Probably something
    really simple like a colon instead of a semi-color or similar.

    > I'm a beginner. That's why I'm here. Not to
    > get negative judgements ; only to get help.


    ...and after you've learned, to give help. :)

    --
    -bts
    -This space intentionally left blank.
     
    Beauregard T. Shagnasty, Dec 31, 2003
    #8
  9. Thibault

    rf Guest

    "Thibault" <> wrote in message
    news:bsuv4e$qdr$...
    >
    > Hey all,
    >
    > I'm beginning with CSS documents, and I have encountered a big problem


    > <style type="text/css">


    This does not belong in a CSS file. Get rid of it.

    > <!--


    Also get rid of these cargo cult comments.


    <snip>

    >
    > I have tried to remove <style> and </style>, but nothing happened. I'm
    > really upset.
    > I'm calling it with this line :
    > <LINK rel="stylesheet" type="text/css" href="style3.css">
    >
    > Any idea of what is the problem ?


    Clear your cache?

    Cheers
    Richard.
     
    rf, Dec 31, 2003
    #9
  10. Thibault wrote:

    > <LINK rel="stylesheet" type="text/css" href="style3.css">


    Are the HTML file and the CSS file in the same directory?

    If so... URL?

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Dec 31, 2003
    #10
  11. Thibault

    Thibault Guest

    Thibault, Jan 1, 2004
    #11
  12. Thibault

    Thibault Guest

    I have done all the suggestions you gave me and have cleared the cache,
    there's no change. Weird, uh ?
     
    Thibault, Jan 1, 2004
    #12
  13. Thibault

    Thibault Guest

    Thibault, Jan 1, 2004
    #13
  14. Thibault wrote:

    > Here is the url of the page :
    > http://perso.wanadoo.fr/titan_keikomi/index.html


    Your HTML is loaded with syntax errors. <http://validator.w3.org/>

    As is your CSS. <http://jigsaw.w3.org/css-validator/validator-uri.html>

    The style sheet also has some nasty constructs.
    <http://css-discuss.incutio.com/?page=UsingPixels>
    <http://www.xs4all.nl/~sbpoley/webmatters/verdana.html>. Also "Style1",
    "Style2", "Style3" aren't very helpful - try using class names that tell
    you about the content (e.g. .footer or .menu) - it makes it a lot easier to
    maintain.

    --
    David Dorward <http://dorward.me.uk/>
     
    David Dorward, Jan 1, 2004
    #14
  15. Thibault

    kchayka Guest

    Thibault wrote:
    >
    > Mozilla, Netscape Navigator and Internet Explorer 6. All works fine. Then I
    > went on my page with a WinXP computer, IE 6 (same version as above) : the
    > css document is not called.


    In IE, Tools -> Internet Options -> Accessibility

    uncheck all the boxes

    --
    To email a reply, remove (dash)un(dash). Mail sent to the un
    address is considered spam and automatically deleted.
     
    kchayka, Jan 1, 2004
    #15
  16. Thibault

    Thibault Guest

    I have verified : it is already unchecked... Have you got an other idea ?
     
    Thibault, Jan 1, 2004
    #16
  17. Thibault

    Thibault Guest


    > Your HTML is loaded with syntax errors. <http://validator.w3.org/>
    >
    > As is your CSS. <http://jigsaw.w3.org/css-validator/validator-uri.html>


    Ok, I think we all agree to say my page is full of errors. Actually, they
    are not errors, but valid, useful references for Opera 7. For instance,
    marginheight & marginwidth, that the validators are not able to recognize,
    are needed in Opera. Remove them and watch the result. Unfortunately, it
    seems that the only browser the w3c cares about is Internet Explorer.
    Nevertheless, the point is not here. I'm grateful for the urls you gave me,
    they helped me to enhance my code. But what I want to know now is why my
    page doesn't display correctly on a second computer which is, apparently,
    correctly configured. That, is the point.
     
    Thibault, Jan 1, 2004
    #17
  18. Thibault

    Steve Pugh Guest

    "Thibault" <> wrote:

    >Ok, I think we all agree to say my page is full of errors. Actually, they
    >are not errors, but valid, useful references for Opera 7.


    Unlikely, Opera 7 has very good support for CSS standards.

    >For instance,
    >marginheight & marginwidth, that the validators are not able to recognize,
    >are needed in Opera. Remove them and watch the result.


    Opera has default padding on body, IE has default margin.
    Add padding: 0; to the styles for body and you won't need those old
    hacks any more (which Opera only supports for compatability with old
    pages that were written with Netscape 4 in mind).

    >Unfortunately, it
    >seems that the only browser the w3c cares about is Internet Explorer.


    LOL. The W3C validators don't care about _any_ browsers, all they do
    is check the code against the published standards. IE meets those
    standards to a lesser extent than modern browsers.

    >Nevertheless, the point is not here. I'm grateful for the urls you gave me,
    >they helped me to enhance my code. But what I want to know now is why my
    >page doesn't display correctly on a second computer which is, apparently,
    >correctly configured. That, is the point.


    IE6 WinXP, the CSS is applied. Most likely something wrong with the
    setup of that one machine. Are other stylesheets applied correctly?

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Jan 1, 2004
    #18
  19. Thibault

    biggo Guest

    "Thibault" <> wrote in message
    news:bsuv4e$qdr$...

    >> { text: #FFFF00; }

    This is not a css property.
    The {color: #000000;} property will define the color of your text in thie
    body element.
     
    biggo, Jan 1, 2004
    #19
  20. In article <bsvf8n$ikb$>,
    "Thibault" <> wrote:

    > "Andrew Glasgow" a écrit dans le message news:
    >
    > > Make the changes I suggest and try again.

    >
    > Unfortunately, there's no improvement.


    What's the set up here? local HTML page, local .CSS file (in text
    format, right?) being loaded by your browser from the HDD?

    Are you able to get any CSS to load at all? Try a basic page and a basic
    CSS file?

    --
    | Andrew Glasgow <amg39(at)cornell.edu> |
    | "It's the rational things we do which worry me the most." |
    | -- Phil Woch in talk.origins |
     
    Andrew Glasgow, Jan 2, 2004
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rod  Snyder
    Replies:
    3
    Views:
    2,618
    =?Utf-8?B?RGF2aWQgQ29l?=
    Feb 2, 2004
  2. Guadala Harry

    View External CSS and .js on Client Side

    Guadala Harry, Feb 13, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    498
  3. Eliyahu Goldin
    Replies:
    1
    Views:
    1,925
  4. Scott Allen
    Replies:
    8
    Views:
    11,054
    Scott Allen
    May 2, 2004
  5. Mellow Crow
    Replies:
    6
    Views:
    444
    Richard Cornford
    Nov 4, 2005
Loading...

Share This Page