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.

2 CSS errors

Discussion in 'CSS' started by vad111, Dec 6, 2009.

  1. #1
    I checked the CSS of this page http://repairpc.co.il/ with W3C CSS validator and it gave these 2 errors:
    120 body Value Error : background #d2d2d2 is not a background-position value : url(/wp-content/themes/C_wp/images/body_bg.gif) repeat-y top #d2d2d2
    485 .bt_inn Value Error : background Parse Error [empty string]

    I don't understand what is wrong with it and what exactly should I correct.
    Please help,
    Thank you,
    Vadim
     
    vad111, Dec 6, 2009 IP
  2. TJ Coldstepper

    TJ Coldstepper Peon

    Messages:
    224
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    When using the shorthand property the order of the property values are always - background-color, background-image, background-repeat, background-attachment, background-position

    In this case Line 120 of your CSS file -
    background:url(/wp-content/themes/C_wp/images/body_bg.gif) repeat-y top #d2d2d2;
    Code (markup):
    has a messed up order and hence you're getting the first error.

    Replace the above with
    background: #d2d2d2 url(wp-content/themes/C_wp/images/body_bg.gif) repeat-y top ;
    Code (markup):
    Coming to your second error...
    Line 485 of your file has -

    background:url(/wp-content/themes/C_wp/images/bt_inn.png) no-repeat scroll 9px;
    Code (markup):
    What is the 9px doing in the background? That is basically the shorthand for your background-attachment property. Backgrounds can either be fixed or scroll.

    Replace with

    background:url(wp-content/themes/C_wp/images/bt_inn.png) no-repeat scroll;
    Code (markup):
     
    TJ Coldstepper, Dec 6, 2009 IP
  3. vad111

    vad111 Active Member

    Messages:
    140
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Wow, thanks TJ
    I corrected it but still it gives now this one error:
    120 body Value Error : background Parse Error [empty string]
    What should I change now?
    Thanks a lot
     
    vad111, Dec 6, 2009 IP
  4. TJ Coldstepper

    TJ Coldstepper Peon

    Messages:
    224
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Your line 120 doesn't seem to have changed? Shows the same as earlier.
     
    TJ Coldstepper, Dec 6, 2009 IP
  5. vad111

    vad111 Active Member

    Messages:
    140
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #5
    No, I changed it
    It shows now that it has a parse error instead of this:
    120 body Value Error : background #d2d2d2 is not a background-position value : url(/wp-content/themes/C_wp/images/body_bg.gif) repeat-y top #d2d2d2

    You probably need to refresh your browser cache
     
    vad111, Dec 6, 2009 IP