Thursday, 4 April 2013

CSS: background:url not working


  1. Refresh the Image folder from the Visual Studio Solution Explorer
  2. Go to the style.css file
    • Put the cursor on the class you are trying to use background:url settings
    • Right click and select build style
      • Select Backgound
      • and in the background-image-->Click Browse and select the image
  3. Done
Sample code:

li.act, li.act:hover
{
    /* The active state of the thumb */
    background-image: url('../../Images/Website/SlideShowApple/active_bg.png');

    background-repeat: no-repeat;
    background-position: right;
}

Note: url('../Images/right-arrow-icon.png'); and url('Images/right-arrow-icon.png'); not same

No comments:

Post a Comment