SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Member
    Join Date
    Apr 2002
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Sigh why wont meh css validate?

    Hmm if anyon would be so kind to check http://home.cfl.rr.com/phire


    This is my first attempt at full xhtml and css, yet it seems my css isnt vaildating very well......anyone know why?


    EDIT:the reason it is so bland is because of a class assignment, lol

  2. #2
    SitePoint Columnist Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The w3 CSS validator is upset because you don't have your DOCTYPE as the first line of your page - instead you have "<!-- saved from url=(0022)http://internet.e-mail -->". Remove that line and have another go.

  3. #3
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are referring to your test.css stylesheet then run it through the W3C online validator.

    http://jigsaw.w3.org/css-validator/validator-uri.html

    The W3C online CSS validator will tell you what each problem is.

    In your case it is the use of non-standard attributes such as opacity and filter.
    These are extensions produced by MS and Mozilla for their own browsers and are not endorsed or recommended (yet) by the W3C, so will not be passed by the current W3C validation process.

    While these attributes remain in your CSS, your CSS will not validate according to W3C standards/recommendations.

    Just make sure that everything else validates and you should be ok.
    Treat the opacity/filter attributes as PC-only add-ons.

    It's also worth noting that neither of the opacity/filter-type attributes are supported on Macintosh.
    Whether that matters or not depends on your audience.

    Also...
    Code:
    background-color: none;
    ...should be...
    Code:
    background-color: transparent;
    There is also no such value as none for font-weight.

    There is no need to include the font-weight attribute at all unless you wish to change it to something other than the browser would set for it.

    The same goes for the cursor attribute.
    New Plastic Arts: Visual Communication | DesignateOnline

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

  4. #4
    SitePoint Zealot LunaC's Avatar
    Join Date
    Feb 2001
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Bill Posters It's also worth noting that neither of the opacity/filter-type attributes are supported on Macintosh.
    Whether that matters or not depends on your audience.
    Do Macs ignore that then? Or can it cause errors for them?

  5. #5
    SitePoint Member
    Join Date
    Apr 2002
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm thanks I fixed those attributes but I still get this when validating the index.htm. It seems in xhtml you cannot set a height for a table? I know using tables for layout s against xhtml standards but even so I should be able to set a height for a table, right?


    Line 21, column 50:
    ... und-color:#fff" align="center" width="700" height="400" cellpadding="5 ...
    ^

    Error: there is no attribute "height" for this element (in this HTML version)

  6. #6
    blonde.... Sarah's Avatar
    Join Date
    Jul 2001
    Location
    Berkshire, UK
    Posts
    7,442
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    no sorry, the height attribute for table and td are not xhtml compliant
    Regular user

  7. #7
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by LunaC
    Do Macs ignore that then? Or can it cause errors for them?
    Macs just ignore them.

    The same with the scrollbar-color style and chromeless window features extensions created by MS for IE PC.
    New Plastic Arts: Visual Communication | DesignateOnline

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

  8. #8
    SitePoint Member
    Join Date
    Apr 2002
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Sarah
    no sorry, the height attribute for table and td are not xhtml compliant

    any certain reason why? that makes no sense to me

  9. #9
    blonde.... Sarah's Avatar
    Join Date
    Jul 2001
    Location
    Berkshire, UK
    Posts
    7,442
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    basically certain tags are depreciated and the height attribute it one of them, css and style sheets are taking over the layouta nd as such there are a number of tags which in theory to be used anymore, click here to find out more, as an example I ran through the last few XHTML and HTML docs and none of them metion the height tag.. sorry will try and find out more info on why..
    Regular user

  10. #10
    SitePoint Columnist Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What Sarah said. XHTML has very few "presentational" attributes. The idea is to keep all of the information on how things should look (which includes stuff like height) in the CSS, and only use "meaningful" markup in the XHTML that helps explain the content.

  11. #11
    SitePoint Zealot LunaC's Avatar
    Join Date
    Feb 2001
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Bill Posters


    Macs just ignore them.

    The same with the scrollbar-color style and chromeless window features extensions created by MS for IE PC.

    Whew


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
  •