Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
What is the best way to link to css style file?
My html pages are two level below the folder containing style.css file, what is the best way to use in the html page header:
link rel="stylesheet" type="text/css" href="../../css/style.css"
or the full url like:
link rel="stylesheet" type="text/css" href="http://www.domain.com/css/style.css%22 ?
Thank you
6 Answers
- Anonymous1 decade agoFavorite Answer
If theyr not from the same location, use the full url
If im wrong dont blame me... ive just made a website using css for the 1st time lol painful learning process....
- 1 decade ago
The full url is always preferred. Links usually stay the same but relative paths do not.
- ?Lv 45 years ago
located this interior the suited area of the cyber internet pages you %. the stylesheet ideal to: <link href="mystylesheet.css" rel="stylesheet" type="text textile fabrics/css"> bear in mind that the course to "mystylesheet.css" will substitute interior the adventure that your HTML techniques are in different folders than your css document.
- 1 decade ago
Probably "../../css/style.css" because it doesn't have to access your domain and translate "www.domain.com" to an IP address.
- Anonymous1 decade ago
To be honest, it really doesnt matter which you use
- 1 decade ago
use the ../../ reference
The server knows were your directory is and anonymity is good.
Both should work however.