www.webdeveloper.com
Results 1 to 3 of 3

Thread: CSS warning - Same colors for color and background-color in two contexts

  1. #1
    Join Date
    Jul 2006
    Posts
    21

    CSS warning - Same colors for color and background-color in two contexts

    Code:
     Same colors for color and background-color in two contexts #sliding_cart and .ui-datepicker-links
    I get around 200 of these warnings or similar using the w3c CSS validator. I was just wondering why, when I'm pretty sure the elements don't cross over each other i.e the text is not being hidden from users. I thought thats what Google et al crapped their pants about.

    Should I be concerned about these warnings and try to fix them? Both for CSS and Google SEO reasons.

    Cheers

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    You have probably set a background in a generic way, let's say:
    Code:
    .myclass{
    background:url(myimg.gif) no-repeat;
    color:#fff;
    }
    The validator assumes that if, for a reason or another, that image will not be visible, the browser will provide a white background by default. To avoid this, you should simply set a certain background color as well(the most appropriate with your image, if you want to)
    Code:
    .myclass{
    background:url(myimg.gif) no-repeat #ff0000;
    color:#fff;
    }

  3. #3
    Join Date
    Sep 2010
    Posts
    5
    You should not about these warnings. There will not any problem Both for CSS and Google SEO reasons.
    Prestashopic - Ecommerce Web Developer

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles