Proper Way to Reference CSS
I'm struggling a bit with a conversion to Dreamweaver from MS Expression Web, but my question is really a generalized issue. I want to know the best way to refer to my CSS from each HTML file (which I do from a Template).
What I WANT to do is this:
<link href="/css/my.css" rel="stylesheet" type="text/css" />
My understanding is that leading slash takes me to the base domain (either HTTP:// or HTTPS:// followed by, for example, mydomain.com), regardless of whether or not my HTML is in a subdirectory. That doesn't seem to work right while editing in Dreamweaver, so I put the full domain in there:
<link href="https://mydomain.com/css/my.css" rel="stylesheet" type="text/css" />
I don't like that, because then I can't experiment with CSS changes with Dreamweaver: I have to publish first; but the relative reference idea above (/css/...) doesn't seem to work within Dreamweaver.
So my question is, what is the BEST way to do this? It turns out my base domain name may change after a testing period, so it would be nice to generalize, though I could make a global change via the Template, so that's not critical. I do not currently use a BASE element, so I will certainly take advice on that, too.
Thanks.
Fred B
