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}

    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. Advertisements

  2. 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, Dec 31, 2003
    1. Advertisements

  3. Thibault

    Thibault Guest

    "Michael Wilcox" a écrit dans le message news:
    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
  4. 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
  5. For starters you do not need to have the trappings of HTML in your .css
    missed a semi-colon (;) here.
    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
    Andrew Glasgow, Dec 31, 2003
  6. Thibault

    Thibault Guest

    "Leif K-Brooks" a écrit dans le message news:
    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
  7. Thibault

    Thibault Guest

    "Andrew Glasgow" a écrit dans le message
    Unfortunately, there's no improvement.

    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
  8. Quoth the raven named Thibault:
    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.
    ...and after you've learned, to give help. :)
    Beauregard T. Shagnasty, Dec 31, 2003
  9. Thibault

    rf Guest

    This does not belong in a CSS file. Get rid of it.
    Also get rid of these cargo cult comments.

    Clear your cache?

    rf, Dec 31, 2003
  10. Are the HTML file and the CSS file in the same directory?

    If so... URL?
    Toby A Inkster, Dec 31, 2003
  11. Thibault

    Thibault Guest

    Thibault, Jan 1, 2004
  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
  13. Thibault

    Thibault Guest

    Thibault, Jan 1, 2004
  14. 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://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
    David Dorward, Jan 1, 2004
  15. Thibault

    kchayka Guest

    In IE, Tools -> Internet Options -> Accessibility

    uncheck all the boxes
    kchayka, Jan 1, 2004
  16. Thibault

    Thibault Guest

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

    Thibault Guest

    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
  18. Thibault

    Steve Pugh Guest

    Unlikely, Opera 7 has very good support for CSS standards.
    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).
    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.
    IE6 WinXP, the CSS is applied. Most likely something wrong with the
    setup of that one machine. Are other stylesheets applied correctly?

    Steve Pugh, Jan 1, 2004
  19. Thibault

    biggo Guest

    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
  20. 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, Jan 2, 2004
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.