SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot slandry's Avatar
    Join Date
    Feb 2002
    Location
    Right behind you!
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    No Styles working in Netscape 7.1.?

    I have some 200+ styles in a css and ALL the styles are working correctly. But for some reason ALL the styles are broken in Netscape? Not just one or two but all 200!

    Can anyone think of a reason how this could be?

    Here is the URL: http://www.seanlandry.com/teststyles.htm


    Code:
     
    <link rel="stylesheet" href="/styles/myBaseStyles.css" type="text/css">
    Last edited by slandry; Feb 11, 2004 at 15:32.

  2. #2
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you triggering standards mode in Netscape?
    (IIRC, right click->view page info, "rendering mode")

    What mime type is being used to serve the CSS files?
    (point Netscape directly at the CSS (type the address of the CSS file into the URL bar) then do the page info thang and look for "Type")

    If the answer to the first question is "yes", then the answer to the second question *must* be "text/css", or none of your styles will work...

  3. #3
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK. If it's in Quirks mode, the problem isn't what I thought it was

    Also, that test style sheet is being served with the correct mime-type (text/css), so that wouldn't be a problem on this test page, even if it did trigger standards mode.

    looking at your test page, I can see a few things wrong immediately. These might cause the problems you're seeing, or they might not...
    HTML Code:
    <html>
       <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
       <head>
     <title>Untitled Document</title>
    That <!DOCTYPE ... > should be before the <html> tag, not after it.
    HTML Code:
    <p class="8ptCopy">asdoinasidb</p>
    Class names should not start with numbers, IIRC. IE might let you get away with it, but other browsers will choke.
    Code:
    #whitenav {
       	font-family: Verdana, Arial, Helvetica, sans-serif;
       	font-size: 8pt;
       	color: #FFFFFF;
       #button ul {
       	list-style: none;
       	margin: 0;
       	padding: 0;
       	border: none;
       }
    OK, where does #whitenav end?
    Code:
       .resultA {
       [snip]
       	background-color: E2E5EE;
     }
    You're missing the # on the start of that hex colour code. You've got quite a few of those in that CSS. Again, IE forgives you, other browsers won't.
    How would I switch it to Standards mode?
    The relatively foolproof way is by making sure all your code validates and has correct DOCTYPE and character encoding headers. However, if you have a large site with masses of old HTML files kicking around, that's not a small task.

    As a first step, I'd recommend at least validating the CSS (w3c validator: http://jigsaw.w3.org/css-validator/), since minor typos in there can blow away whole swathes of the style sheet.

  4. #4
    SitePoint Zealot slandry's Avatar
    Join Date
    Feb 2002
    Location
    Right behind you!
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your help. Looks like I've got some cleaning up to do!


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
  •