Links in Netscape

liunx

Guest
I have the following stylesheet:

<STYLE type="text/css">
<!--
A:link {color: #99CCCC; text-decoration: none;}
A:visited {color: #99CCCC; text-decoration: none;}
A:hover {color: #999999; text-decoration: none;}
A:active {color: #99CCCC; text-decoration: none;}
-->
</style>


I have the following HTML file.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>EDINBURGH PROPERTY SURVEY</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href=http://www.webdeveloper.com/forum/archive/index.php/"styles/styles.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="#669966" text="#FFFFFF">
<p><b><a href=http://www.webdeveloper.com/forum/archive/index.php/"right.htm" target="mainFrame">HOME</a><br>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"about/index.html" target="mainFrame">ABOUT</a><br>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"report/index.html" target="mainFrame">REPORTS</a><br>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"links/index.html" target="mainFrame">LINKS</a><br>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"faq/index.htm" target="mainFrame">FAQs</a></b></p>
<p><img src=http://www.webdeveloper.com/forum/archive/index.php/"http://www.ndo.com/cgi-bin/counter.cgi?ft=0|prgb=ffffff|df=alanhay.dat|dd=D"></p>
</body>
</html>


Why are the links only displayed properly on Netscape after I have clicked them and refreshed the page?

I am never working on a f***ing HTML project again. I wrote a complicated HTML parser, database loader and HTML report creator in 3 days this week. I have since spent the last 4 days pissing about trying to get the reports to display as they should in various browsers.1. Use a full Doctype because what you have could put some browsers into quirks mode.

2. Your links should be defined this way.

A { color: #99CCCC; text-decoration: none; font-weight:bold; }
A:hover { color: #999999; }

3. Then get rid of your <b> tag.

4. You don't need to include the <style> tags in your external CSS file, but just the CSS itself.

5. Also define the attributes of your <body> tag in your CSS.Cheers. removing the <STYLE> tags seemed to be the one that did the trick.


AlanAaaaaaargh.

Stylesheet:

body{background-color:#669966; color:#FFFFFF; font-size:small; font-family:tahoma, verdana, arial, sans-serif; font-weight:bold;}
A{color:#99CCCC; text-decoration: none;}
A:link {color: #99CCCC; text-decoration: none;}
A:hover {color: #999999;}

HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>EDINBURGH PROPERTY SURVEY</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href=http://www.webdeveloper.com/forum/archive/index.php/"styles/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<p><a href=http://www.webdeveloper.com/forum/archive/index.php/"right.htm" target="mainFrame">HOME</a><br>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"about/index.html" target="mainFrame">ABOUT</a><br>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"report/index.html" target="mainFrame">REPORTS</a><br>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"links/index.html" target="mainFrame">LINKS</a><br>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"faq/index.htm" target="mainFrame">FAQs</a></p>
<p><img src=http://www.webdeveloper.com/forum/archive/index.php/"http://www.ndo.com/cgi-bin/counter.cgi?ft=0|prgb=ffffff|df=alanhay.dat|dd=D"></p>
</body>
</html>


Works perfectly in IE Mac & PC, Safari. On Netscape however,IT WILL ONLY WORK ON MY LOCAL MACHINE. Once uploaded to my server, the stylesheet is ignored completely.

Any ideas?

Thanks.

AlanWorks perfectly in IE Mac & PC, Safari. On Netscape however,IT WILL ONLY WORK ON MY LOCAL MACHINE. Once uploaded to my server, the stylesheet is ignored completely.
Your server is probably not serving the style sheets with the proper content type. Load the style sheet directly from the server into NS, do a View Page Info and check out the Type. It's probable text/plain or text/html; should be text/css.Thanks.

That does appear to be what is happening.

Alan
 
Back
Top