I uploaded a few pages to my site, lukeprog.com. All of them link to "/style.css" from the header:
No matter what page has that code in the header, it should look in the base directory of the whole domain (lukeprog.com/) for lukeprog.com/style.css, right?
But it isn't. The stylesheet isn't being applied.
See for yourself, and please advise:
Remove the slash (/), making
Remove the slash (/), making the address relative. :shrug:
kk5st: Yes, but I'm going
Yes, but I'm going to use the same navigation code on every page. Let's say the code is on http://lukeprog.com/love/articles/hoax.html
A relative link would then look for the stylesheet at http://lukeprog.com/love/articles/style.css, and of course it won't be there.
I want the code to always look at [domain.com]/style.css, no matter where the header code is.
What I'm doing doesn't do that, even though it should. Why? How can I do that?
Why doesn't "/style.css" look to "http://lukeprog.com/style.css"?
Arghh! I knew there'd be
Arghh! I knew there'd be some simple explanation.
As well as the spurious
As well as the spurious forward slash on the rel attribute why have you used the title attribute? if there is a reason fine although I wouldn't name a sheet in that fashion, and it tends to suggest that perhaps you misunderstand the purpose and nature of the title attribute when specifically used in stylesheet links. For a single call to a stylesheet you do not need to set the file as a 'Prefered' one rather than the default 'Persistant'
I did what I did because
I did what I did because that's the code I copied from somewhere else. I'm definitely a CSS newbie.
Thanks for the help, guys.