my stles are working in netscape when i embed them in the html file, but when i try and link to a stylesheet it doesn't render properly.
my style sheet is called test.css and contains only:
<!-- BODY TAGS -->
body { font-family: sans-serif;
font-size: 10px;
color: #000000;
text-align: center }
<!-- LINK TAGS -->
a { color: #0000FF; text-decoration: none }
a:hover { text-decoration: underline }
my page is called test.html and contains:
<html>
<head>
<title>Untitled</title>
<LINK REL="STYLESHEET" TYPE="text/css" HREF=http://www.webdeveloper.com/forum/archive/index.php/"test.css">
</head>
<body>
this is some test text<BR><BR><BR><BR>
<A href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.yahoo.com">this is a test link</A><BR>
</body>
</html>
what gives?
*akosz*You should use /* comment */ for your comments, instead of the HTML <!-- comment --> comments.
[J]onaI just thought I'd explain why I think this would be the problem... When embedded into the HTML, the browser will render <!-- and --> as HTML comments, but when you put it in a CSS file, the browser renders the <!-- and --> as CSS, and it doesn't understand that "CSS" code.
[J]onawow, that was simple.
i forgot where i learned to use the html comments for css pages, i think it was in a book. if i ever come across it again i'll be sure to burn it.
i guess it's never been an issue because i've always just coded to ie or didn't use comments.
thanks so much!
*akosz*You're welcome, I'm glad I helped!
[J]ona
my style sheet is called test.css and contains only:
<!-- BODY TAGS -->
body { font-family: sans-serif;
font-size: 10px;
color: #000000;
text-align: center }
<!-- LINK TAGS -->
a { color: #0000FF; text-decoration: none }
a:hover { text-decoration: underline }
my page is called test.html and contains:
<html>
<head>
<title>Untitled</title>
<LINK REL="STYLESHEET" TYPE="text/css" HREF=http://www.webdeveloper.com/forum/archive/index.php/"test.css">
</head>
<body>
this is some test text<BR><BR><BR><BR>
<A href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.yahoo.com">this is a test link</A><BR>
</body>
</html>
what gives?
*akosz*You should use /* comment */ for your comments, instead of the HTML <!-- comment --> comments.
[J]onaI just thought I'd explain why I think this would be the problem... When embedded into the HTML, the browser will render <!-- and --> as HTML comments, but when you put it in a CSS file, the browser renders the <!-- and --> as CSS, and it doesn't understand that "CSS" code.
[J]onawow, that was simple.
i forgot where i learned to use the html comments for css pages, i think it was in a book. if i ever come across it again i'll be sure to burn it.
i guess it's never been an issue because i've always just coded to ie or didn't use comments.
thanks so much!
*akosz*You're welcome, I'm glad I helped!
[J]ona