SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jul 2001
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS not working in IE

    When I open a CSS-formated page in Netscape 6.2, it displays exactly as it should, but when I try to view the same page in Internet Explorer 5.5, no formatting at *all* is displayed, just whatever is in the raw HTML file. I've attached the CSS file I'm using. Does anyone have a clue what could be wrong? I'm stumped.
    Attached Files Attached Files

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Location
    MY
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how do you place your css code ?

    inside the <head> section or using <link rel="stylesheet" ....> ?

  3. #3
    SitePoint Member
    Join Date
    Jul 2001
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I link to an external .css stylesheet.

  4. #4
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vlink and alink are not valid CSS terms.
    Refresh your knowledge of Pseudo classes for the correct terms.

    alink should be active
    vlink should be visited
    alink should be active

    The : is used legitimately as part of CSS formatting, so using it in the local url of you body background image may be tripping up the browser as it reads the css file by somehow confusing the declaration.


    Also, perhaps the \ should all be /
    I am aware that using the backward slash in urls can have unpredictable results on different browsers/platforms.
    It's best to stick to /

    The px units in your attributes should go straight after the number of units.
    I.E. 123px, not 123 px

    Fwiw, the align attribute doesn't exist in CSS- yet.
    The closest it has so far (upto CSS2) is text-align which can be used on images, but is not 100% reliable when used in this way.
    Some browers will use it just fine, others won't.

    It's also worth changing your colour 'names' to their hexidecimal equivalents as names are not part of the CSS standard.
    gray should be #808080
    black should be #000 (or #000)

    Check out the W3Schools CSS colour names list and colour values intro for a more complete list.

    --

    A good way to check out what may be wrong with your css is to run it through the W3C CSS validator.
    I did this with your CSS and it highlighted straight away a number of invalidations and potential problems.

    Only running the page again with the CSS file alterations will tell you for sure if these changes will solve the problem, but I definately see them as being potential causes.
    My best guess is that problem is coming from either the : or the \ or both.
    The others issue like the pseudo-classes and the px units, while not 'standard' CSS, shouldn't actually break the file or cause it to be misread.

    Hope this helps.
    Last edited by Bill Posters; May 27, 2002 at 00:15.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature


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
  •