Quantcast
Channel: CSS instructions » Uncategorized
Viewing all articles
Browse latest Browse all 3

CSS Background properties

$
0
0

The final technique employed in this example is the use of a relative file path preceded by two periods and a forward slash: background-image: url(‘../images/backgrounds/dinner_glass.jpg’); The two periods and forward slash before the reference to the images directory tells the browser that the images directory can be found in the parent directory of the style_sheets directory. The parent directory here is the chokoloskee-island directory. This is necessary because, if I specified the file path like this background-image: url(‘images/backgrounds/dinner_glass.jpg’); the browser would expect the images directory to be in the style_sheets directory and would consider style_sheets/images/backgrounds/dinner_glass.jpg to be the path to the dinner_glass.jpg. Of course, the browser wouldn’t be able to find the image there. So I used the two periods and forward slash to tell it to first go up one directory level before looking for the images directory.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images