How to Remove Warnings From My CSS

Discussion in 'CSS' started by UIUXExpert, Aug 20, 2013.

  1. #1
    Hello Everyone,

    I'm getting two warnings in my css
    On Line 9
    You have no color set (or color is set to transparent) but you have set a background-color. Make sure that cascading of colors keeps the text reasonably legible
    On Line 52
    You have no background-color set (or background-color is set to transparent) but you have set a color. Make sure that cascading of colors keeps the text reasonably legible.


    this is my CSS Code

    #colorpicker {
    position : absolute;
    width : 145px;
    height : 135px;
    overflow : hidden;
    background : #F9F9F9;
    border : #C0C0C0 outset 2px;
    z-index : 1000;
    }
    #colorpicker-hue-container {
    position : absolute;
    top : 4px;
    left : 120px;
    width : 18px;
    height : 110px;
    }
    #colorpicker-hue-bg-img {
    width : 100%;
    height : 100%;
    }
    #colorpicker-hue-slider {
    position : absolute;
    top : 0;
    left : 0;
    width : 100%;
    height : 100%;
    }
    #colorpicker-hue-thumb {
    position : absolute;
    top : 0;
    left : 0;
    width : 18px;
    height : 18px;
    z-index : 1009;
    cursor : default;
    }
    #colorpicker-bar {
    text-align : right;
    padding-right : 10px;
    }
    #colorpicker-close {
    cursor : pointer;
    color : blue;
    font-size : 10px;
    font-family : Tahoma, Helvetica, Sans-Serif;
    font-weight : bold;
    }
    #colorpicker-div {
    position : absolute;
    top : 8px;
    left : 8px;
    width : 100px;
    height : 100px;
    border : #666 solid 1px;
    }
    #colorpicker-bg, #colorpicker-bg-overlay {
    position : absolute;
    top : 0;
    left : 0;
    width : 100%;
    height : 100%;
    z-index : 1001;
    overflow : hidden;
    }
    #colorpicker-selector {
    position : absolute;
    top : 0;
    left : 0;
    width : 11px;
    height : 11px;
    z-index : 1009;
    margin-top : -6px;
    margin-left : -6px;
    cursor : default;
    }
    #colorpicker-selector img {
    position : absolute;
    left : 0;
    top : 0;
    }
    #colorpicker-footer {
    position : absolute;
    top : 114px;
    left : 10px;
    width : 127px;
    }
    #colorpicker-value {
    float : left;
    }
    #colorpicker-value, #colorpicker-value-input {
    font-size : 9px !important ;
    font-family : Helvetica, Verdana, Sans-Serif;
    height : 10px;
    }
    #colorpicker-value-input {
    width : 40px;
    }
    #colorpicker-okbutton {
    float : right;
    padding : 0 10px;
    background : #3366FF;
    font-size : 10px;
    font-family : Tahoma, Helvetica, Sans-Serif;
    border : #666666 solid 1px;
    color : #ffffff;
    }

    Anyone can help me to resolve this Problem

    Thanks

    Regards Jagdeep S.
     
    UIUXExpert, Aug 20, 2013 IP
  2. SystemOAD

    SystemOAD Well-Known Member

    Messages:
    548
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    195
    Digital Goods:
    1
    #2
    What cms are you using? Do you want to share the url where you are having the problem so we can see?

    I would guess you need to find out which file those warnings are generated in and delete the line?! Or maybe you have the option to turn the warnings off in an admin panel?

    On a side note, are you trying to hide content? If so I would watch it because its something google will punish you for, so maybe you're better off just changing the colours so you don't have hidden text!
     
    SystemOAD, Aug 20, 2013 IP
  3. UIUXExpert

    UIUXExpert Greenhorn

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #3
    I'M JUST USING Font site Script.and i'm not getting any error,just trying to fix everything in my site and trying to making it Seo Friendly.You can see my website at http://fontvila.com website is not good seo friendly
     
    UIUXExpert, Aug 20, 2013 IP
  4. HuggyStudios

    HuggyStudios Well-Known Member

    Messages:
    724
    Likes Received:
    20
    Best Answers:
    26
    Trophy Points:
    165
    #4
    Those errors won't affect SEO, it's just CSS.
     
    HuggyStudios, Aug 20, 2013 IP
  5. UIUXExpert

    UIUXExpert Greenhorn

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #5
    no there is alot error in my Website like many h1 tag on home page, Images without tag, and many more error
     
    UIUXExpert, Aug 20, 2013 IP
  6. HuggyStudios

    HuggyStudios Well-Known Member

    Messages:
    724
    Likes Received:
    20
    Best Answers:
    26
    Trophy Points:
    165
    #6
    You need to take out all of the JavaScript first of all, that's causing many errors. Change all of the onClick etc to something jQuery rather then like $('.element').click(function() {});

    http://validator.w3.org/check?uri=h...(detect+automatically)&doctype=Inline&group=0

    Have a look through those errors, most can be fixed quite easily.
     
    HuggyStudios, Aug 20, 2013 IP
  7. UIUXExpert

    UIUXExpert Greenhorn

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #7
    i don't have any idea about javascript so i'm unable to fix them
     
    UIUXExpert, Aug 20, 2013 IP
  8. HuggyStudios

    HuggyStudios Well-Known Member

    Messages:
    724
    Likes Received:
    20
    Best Answers:
    26
    Trophy Points:
    165
    #8
    If making this page meet the standards set out by W3C then you are going to have to rewrite the whole page to be honest. The structure is seriously bloated with unnecessary divs and garbage. If you are unable to code this yourself, I recommend hiring a developer to do it for you.
     
    HuggyStudios, Aug 21, 2013 IP
  9. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #9
    While there is NO excuse for invalid markup, at least on the template itself (content... well, it happens from time to time) -- but in terms of the CSS, if all you are getting is warnings, ignore them! The CSS validators warnings are absolute BS, particularly the ones about color as it cannot see what color your images are, it often drops the ball on inheritance or fails to understand what elements are over other elements -- which is why they are WARNINGS in the first place! If they were actually a problem they'd be ERRORS!

    ... and as HuggyStudios implied, CSS really has jack **** to do with SEO. CSS is just what it looks like, and since search engines don't have eyes they don't give a flying purple fish about what you do in your CSS with TWO exceptions; the same two exceptions that plague screen reader users: display:none; and visibility:hidden; -- Google and some other engines WILL ignore content set to those, which is why using either of those on anything that's content or navigation should be avoided.

    HuggyStudios was also right in saying it needs to be tossed and started over. I have no clue what "Font site script" is, but if this is the result there is NOTHING of value it provides. With 142 validation errors it's not even HTML, it's gibberish. You mentioned just some of your issues -- but really it runs bone deep if you actually care about users visiting the site and getting something meaningful out of it. Invalid heading orders, clearing DIV like it's still 2001, doctype proudly proclaiming the code is in 'transition' from 1997 to 1998 coding practices, that fat bloated idiotic halfwit bull known as YUI, endless annoying pointless scripting for **** only knows what, idiotic 'onclick' redundant to the anchors it's wrapping...

    It's hardly a shock that the main page ends up an ungodly 81k of markup to deliver 1.2k of plaintext and maybe a dozen and a half content images -- easily anywhere from six to ten times as much code as should be used on such a simple page.

    Toss it and start over from scratch -- whatever that was built using is NOT worth a flying purple fish.
     
    deathshadow, Aug 21, 2013 IP
    HuggyStudios likes this.