How can I accurately reference my stylesheet?
Posted on 2015-01-14
Here's the way my site's organization looks:
app folder 1
app folder 2
In my app folder, I'm referring to my stylesheet.css located in my css directory like this:
<link href="../css/new_style.css" rel="stylesheet" type="text/css" />
Works great! All my fonts, margins, divs - everything is fine. The problem, however, is that none of my images show up because I'll have a background image in my stylesheet referenced as:
But because I'm sitting in my "app folder 1" directory, that URL doesn't work.
I realize I could probably change the URLs of my background images to an absolute value rather than a relative one, but it seems I saw a technique using "_DIR_" that remedies all of this.
I might be wrong, but I wanted to see if there was a way to code the reference to my stylesheet.css where any image url was handled correctly.