|
html, body { width: 100%; margin: 0px; background-image: url(/background.gif) } |
<head> <link rel="stylesheet" type="text/css" href="/background.css" /> </head> |
Just like images, stylesheets, if linked to the document via the <LINK> tag must be stored in the Web tree and referred to using absolute paths (starting with a slash character). If for example you copy the file mystyle.css in the stylesheets subdirectory of your Web root, you can refer to it with:
<LINK rel="stylesheet" type="text/css" href="/stylesheets/mystyle.css">
If the file is simply copied to your Web root directory then all you need is a leading slash before the file name: <LINK rel="stylesheet" type="text/css" href="/mystyle.css"> |
hr {color: sienna} body {background-image: url("images/background.gif")} |
<head> <link rel="stylesheet" type="text/css" href="background.css" /> </head> |
Regards.