It’s all Relative in a CSS Stylesheet CodeUnit 07 MAR 2009

CSSSeeing as I am currently in the process of retooling my web development skills, replacing my preference for table-based layouts with CSS controlled formatting, JQuery, MooTools, and Apache run sites instead of IIS, I’m pretty much in self study mode at the moment, which brings me to this little tidbit of information that shockingly, I can’t believe I wasn’t aware of, despite the fact that I’ve been using CSS (Cascading Style Sheets) for years already!

Oh well, you know what they say about teaching an old dog new tricks I guess…

So apart from the old Netscape Navigator 4 browser, all browsers search for referenced elements relative to the stylesheet file that is calling them instead of the actual page which is actually linking to the stylesheet!

In other words, CSS is applied relatively to the actual CSS content itself, meaning that you need to make provision for this little ‘feature’ when working in a site that has quite a diffuse folder structure.

Hmm, seriously can’t believe that I only just learned that now! O.o

Related Posts:

About Craig Lotter

South African software architect and developer at Touchwork. Husband to a cupcake baker and father to two little girls. I don't have time for myself any more.