1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

0 error in validation - Is it necessary?

Discussion in 'HTML & Website Design' started by ads2help, Nov 27, 2009.

  1. #1
    I am okay with validating my page in xHTML but not CSS 2.1 (sometimes).

    What if my page have to use "opacity" which is not included in the CSS 2.1 spec? Should I remove it or just ignore the validation?

    What do you think?

    Thank you.
     
    ads2help, Nov 27, 2009 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Why not validate against css3?

    If you know why you're using some non-css2.1 property or value—opacity and MSFT's filter are good examples—then it's not a problem. Validation will help you catch those inadvertent errors and the odd brain-fart, for example "no-wrap" instead of "nowrap".

    cheers,

    gary
     
    kk5st, Nov 27, 2009 IP
    ads2help likes this.
  3. ads2help

    ads2help Peon

    Messages:
    2,142
    Likes Received:
    67
    Best Answers:
    1
    Trophy Points:
    0
    #3
    Thanks for the response. Its because I saw some people at other forums pointing out the css 2.1 validation error due to opacity and said the designer s*ck. :p

    So I wonder which css version that most people are paying attention to/we should follow? Or it is all up to us?

    Thank you.
     
    ads2help, Nov 27, 2009 IP
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    CSS3 is being approved (er, made into recommendations from drafts) in modules, that is, there will prolly be a dude on Mars before the entirety of CSS3 is "finished".

    And that aside, even if it was all a candidate recommendation, browser support is spotty. Use what works, and to hell with the validation (as Gary said, CSS validation is more to catch your typos rather than to sport an shiny badge on your site saying VALID CSS which is pointless). HTML validation matters. CSS validation, in the context of vendor-specific extensions and CSS3, doesn't.

    Most of MY css is CSS2.1 and then if I want to add something for some browser then I do.

    If you make an HTML error, the jack-booted thugs of the Fascist Theocracy of Web Evangelistas will break into your bedroom in the deep of night, stuff you in a sack and carry you off to go work at Microsoft's IE team for East Timor wages.

    If you make a CSS error, you just get weenies whinging at you on forums : )
     
    Stomme poes, Nov 27, 2009 IP
  5. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #5
    Anyone who says so is an amateur who doesn't know the difference.
    What Gary said.
     
    drhowarddrfine, Nov 27, 2009 IP
  6. taminder

    taminder Peon

    Messages:
    581
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    as long as it says it's valid.
     
    taminder, Nov 27, 2009 IP
  7. Ashtone

    Ashtone Peon

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    As mentioned by the other (intelligent) people on this page, Its not that important.

    Infact, you will find a lot of MASSIVE sites, dont use valid CSS.

    Html validation is a must

    CSS Validation is best to get as close to as you can.

    Every website that uses some form of lightbox is invalid ;)
     
    Ashtone, Nov 29, 2009 IP
  8. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #8
    @Ashtone,
    Two years from now, you won't be doing this anymore and will wonder how the world passed you by.
     
    drhowarddrfine, Nov 30, 2009 IP
  9. Ashtone

    Ashtone Peon

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Please tell me why? I am a recognised designer and lots of my work is featured on showcases etc.

    Of course, once CSS3 lands it will of course be 100% necessary to be valid, once again.

    There are just some circumstances where you can't avoid having invalid css, maybe just 1 error, but still invalid, which is better, to have 1 error or to have a site that looks much worse?

    Edit: Also by the intelligent commend i wasnt reffering to you, apologies, I was referring to taminder who believes a 7 word reply is decent.
     
    Ashtone, Nov 30, 2009 IP
  10. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #10
    If your markup is invalid then it is written in error. Just because it works does not mean it is reliable and any change in browser software can change how it renders your error. Never rely on invalid markup to always be the same in all browsers all the time.
     
    drhowarddrfine, Nov 30, 2009 IP
  11. incomesinternational.com

    incomesinternational.com Peon

    Messages:
    187
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #11
    LMAO, I've been wondering what that smell was and why I was the only one who could smell it.

    ...brain farts...I love it!

    Thanks Gary you've put a shine on an otherwise dull day.
     
  12. Ashtone

    Ashtone Peon

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #12
    So, for my site:

    http://jigsaw.w3.org/css-validator/...rofile=css21&usermedium=all&warning=1&lang=en

    I should do without using a lightbox? Or have I just made some gross error :|

    Whilst yes, it comes up with errors, I have checked in all browser's and it displays fine, it even degrades properly.


    Btw, heres examples I was referring to earlier:

    http://jigsaw.w3.org/css-validator/...rofile=css21&usermedium=all&warning=1&lang=en

    http://jigsaw.w3.org/css-validator/...rofile=css21&usermedium=all&warning=1&lang=en
     
    Ashtone, Nov 30, 2009 IP
  13. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #13
    @Ashtone: You're probably ok on this. When checking css validity, you have to apply your own knowledge. Look seriously at that background error. For the opacity stuff, -moz-, and other proprietary prefixes ( e.g. -o- -ms -mso -webkit- ) are valid; the validator just doesn't know it. Decide for yourself if css3 stuff belongs in your document.

    IE allows javascript expressions. These are not valid, but are something that IE sometimes needs. Your decision.

    The key is to know why you're using an invalid property or value. Come to think of it, it's at least as important to know that they're invalid.

    cheers,

    gary
     
    kk5st, Dec 1, 2009 IP
  14. Typo Tat

    Typo Tat Peon

    Messages:
    115
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    No one cares about CSS validation, there's no value to it whatsoever.

    HTML validation might be worth something (though not much) because the HTML it's accessed by bots who might determine the future of your site, and it also might (barely) affect the load time of your pages.

    CSS, on the other hand, is just decoration. You might run it through a validator to make sure no glitches happened, but in the grand scheme of things CSS validation just doesn't matter.
     
    Typo Tat, Dec 1, 2009 IP
  15. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #15
    I disagree (with the not much statement). Valid markup is the place to start, before anything else. "Big companies don't have valid markup so it's okay" is such a BS answer one hears a lot on these forums. Try this one: "Big companies like Hershey's and Mars use child slave labour for their chololate so it's okay".

    Screw bots, how about the sanity of the coder? Or the sanity of a visitor using assistive technology?

    Esp on forums like this where people show up asking why their code doesn't work, when the problem isn't some browser bug but that their HTML is just a steaming pile of tag soup code.
     
    Stomme poes, Dec 1, 2009 IP
  16. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #16
    As the validator says, it's checking for CSS 2.1 errors but you are using CSS3 properties. As Gary implies, there's nothing wrong with doing such a thing and vendor extensions, such as -moz and -webkit are perfectly valid markup and live in the specification but suggesting that having errors in markup and thinking that's OK just because it works for the moment is a lazy man's move. As I said, counting on errors to work the same everywhere every day is not a smart thing to do.
     
    drhowarddrfine, Dec 1, 2009 IP
  17. Ashtone

    Ashtone Peon

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Ah, that was not the point I was tyring to make, I was suggesting you sometimes cant avoid receiving an invalid markup (with things like opacity) and as I said: "CSS Validation is best to get as close to as you can."

    Anyway, an interesting discussion ^^
     
    Ashtone, Dec 1, 2009 IP
  18. FreeWebsiteHostingReviews

    FreeWebsiteHostingReviews Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    If the website or web pages are only HTML/XHTML and CSS, the way that I approach it is that first the HTML code must be W3C XHTML 1.0 Strict standards compliant and also the CSS styles must be 2.1 valid. Then I check to see that the website or web pages work in the most common browsers. However, for some sites I use the target attribute in some of my outbound links which means that that page will not validate as XHTML 1.0 Strict and that I have to use the transitional DTD and that's okay with me because all my websites work as I want them to :)
     
  19. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #19
    To be clear: 'opacity' and -moz, -webkit, etc. ARE valid markup but it's CSS3 and there is no CSS3 validator now that I'm aware of.
     
    drhowarddrfine, Dec 2, 2009 IP
  20. ham

    ham Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #20
    It's not an absolute must to have valid CSS, but it's nice. The same goes for html and xhtml, in my opinion they should both be valid whenever possible but it won't destroy anything if there are a few well thought out errors. Point being, be aware of why something doesn't validate.
     
    ham, Dec 2, 2009 IP