Posted over 4 years ago

I have multiple stylesheets and so I wanted to keep these files in their own folder, but then I realized I also referred to images in the images folder in the root folder.

I had to refresh my memory on how to refer to a folder outside the file's folder, because I didn't want to create two folders named images.

They key to writing an image url to refer to an outside folder is to use the two dots before the blackslash.

background-image: url("../images/name.jpg");

NOTE: Must use 2 dots not 3.

You might also like

Watch a folder for changes to files, then reload Chrome
How To Create a Notebook Design with CSS
How to Make CSS Layouts With Blueprint, a CSS Framework - YouTube


Talentopoly Newsletter

A once-weekly round-up of the best programming and design posts.

Join 2050+ subscribers

We will never spam or share your email address. Easily unsubscribe

15b2f7b_speck Jared_gaze_speck