How to use background-image correctly?

-2

This command below is what I use in the current MENU of my Blog, however I would like to change the look and put a background image in MENU. how do I do this using background-image? where save the image to be fetched by the command? how to know the directory of the image?

#PageList1 ul {
border-top: 2px solid #ccc;
border-bottom: 2px solid #ccc;
    
asked by anonymous 16.10.2018 / 01:15

2 answers

0

Exit a level and enter the img folder

PageList1 ul {
   border-top: 2px solid #ccc; 
   border-bottom: 2px solid #ccc; 
   background-image: url("../img/remove-icon-small.png") !important;
}

same level of the css file and enters the img folder

PageList1 ul {
   border-top: 2px solid #ccc; 
   border-bottom: 2px solid #ccc; 
   background-image: url("/img/remove-icon-small.png") !important;
}

Same level of css without going into any folder

PageList1 ul {
   border-top: 2px solid #ccc; 
   border-bottom: 2px solid #ccc; 
   background-image: url("remove-icon-small.png") !important;
}

You should consider the url of the image according to the folder structure if the image is in the same root as the css file then disregard put ../ , so on.

    
16.10.2018 / 01:19
0

Thanks for the attention, my friend ... I've managed to resolve it by hosting the image here: link , and copying the URL of the same.

    
17.10.2018 / 12:05