Results 1 to 12 of 12

Thread: Css

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140

    Css

    I need good documentation on why this is not valid.

    Code:
    body {
      background-color: #ffffff;
    }
    The W3C's doco is absolutely horrible. It does nothing to help promote the standard.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  2. #2
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    Try spelling color differently... Try spelling it: colour.. I don't know other than that!

  3. #3
    scoutt
    Guest
    is it for the background for the whole site? or just an element?

    if for the whole site it is not valid, because you use this
    body{
    background: #FFFFFF;
    }

    and the background-color is for elements like <h1>

    background

    background-color

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Well, I finally figured out what W3C was complaining about.

    When you specify a background color you should specify a foreground color, too. It would suck if the user's CSS foreground color was the same as your document's background color.

    The error message from W3C's validator just said "you have no color specified with background-color". That was confusing.

    As to using background instead of background-color, that is a minor point. Both are supported in CSS2, but the validators do recommend using background unless you expressly need to set background-color and background-image differently. And even then, you can set both with background. Don't ask me why, I don't think they know.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  5. #5
    Hyperactive Member DKCK's Avatar
    Join Date
    Dec 2000
    Location
    United States
    Posts
    329
    Of course it also depends on what browser is used. With Netscape, just about anything with CSS is not valid...

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    I very explicitly don't care about the browsers. All web development conforms to standards. If your browser has a problem viewing the page, then it has a problem with the standard. In those cases, I couldn't care less.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  7. #7
    scoutt
    Guest
    well said Citizen Travis

    If only the browser company cared about that

  8. #8
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Yeah, but no browser seems to fully conform to the standards, and when they do, there will be new standards written. Also, the standards can be interpreted in slightly different ways - I know Opera has said this about slight rendering differences between it and other browsers.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  9. #9
    Hyperactive Member DKCK's Avatar
    Join Date
    Dec 2000
    Location
    United States
    Posts
    329
    I very explicitly don't care about the browsers. All web development conforms to standards. If your browser has a problem viewing the page, then it has a problem with the standard. In those cases, I couldn't care less.
    You may not care less but those using browsers do..

  10. #10
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    A lot of "normal" users won't even know what browser they're using -- "I click the blue 'e' to go on the Internet"...
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  11. #11
    Hyperactive Member DKCK's Avatar
    Join Date
    Dec 2000
    Location
    United States
    Posts
    329

    Talking

    Most users don't even know what a browser is.

  12. #12

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Originally posted by JoshT
    Yeah, but no browser seems to fully conform to the standards, and when they do, there will be new standards written. Also, the standards can be interpreted in slightly different ways - I know Opera has said this about slight rendering differences between it and other browsers.
    Yes, Opera's margins are bothering me right now, and Netscape still shows the outlines of invisible inputs.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width