Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > inetserver iis > february 2005 >

inetserver iis : Strange IIS5.1 problem with CSS and anchors


mhj NO[at]SPAM w-link.net
2/21/2005 1:37:43 AM
I'm uss CSS to change the default link (<a href=""></a>) colors on a
web page. Everything looks fine when I upload the pages to a web host,
and when I view them directly on my hard drive with IE6.

The problem starts when I view them locally through IIS
(http://localhost/...).
The page displays all the rest of the CSS info fine, except anything
to do with anchors. The a:hover works fine, but the page doesn't show
any changes made to any of the other a: properties
(link/visited/active).

The code is below. Is it a quirk in IIS5.1? Am I coding something
wrong? I should mention I'm a total newbie; I've been teaching myself
CSS and HTML out of a library book over the last week.


2c.html:

<html>

<head>
<title>playing with css</title>
<link rel="stylesheet" href="test2.css" type="text/css">
</head>

<body>

<table border="1" width="100%">
<tr>
<td width="33%"> <a class="topLinks" href=""> yyyy </a> </td>
<td width="33%"> <a class="topLinks" href=""> xxxx </a> </td>
<td width="34%"> <a class="topLinks" href=""> xxxx </a> </td>
</tr>

<tr>
<td width="33%"> <a class="topLinks" href=""> xxxxx </a> </td>
<td width="33%"> <a class="topLinks" href=""> xxxxx </a> </td>
<td width="34%"> <a class="topLinks" href=""> xxxxx </a> </td>
</tr>

<tr>
<td> <a class="wahoo" href=""> test test </a> </td>
</tr>
</table>

<p class="whatever">

2c 2c 2c

</p>

<a class="wahoo" href=""> test test </a>


</body>
</html>


test2.css:

a.topLinks:link {color: black; background: blue; font-size: 15pt;
text-decoration: none;}
a.topLinks:visited {color: red; font-size: 15pt; text-decoration:
none;}
a.topLinks:hover {color: blue; background: black; font-size: 15pt;
text-decoration: none;}
a.topLinks:active {color: #008000; font-size: 15pt; text-decoration:
none;}

a.wahoo:link {color: red; background-color: black;}

jeff.nospam NO[at]SPAM zina.com
2/21/2005 1:26:45 PM
[quoted text, click to view]

It's not IIS, you might ask in a CSS or HTML group for help.

Jeff


[quoted text, click to view]
mhj NO[at]SPAM w-link.net
2/21/2005 4:48:57 PM
[quoted text, click to view]


The problem only occurs when I view the page on my own machine's
IIS5.1 server. When the page is viewed using IE6 on either the website
or on the hard drive, everything looks just fine.

Logically, if 2 out 3 ways of viewing the page look fine, and the 3rd
way is IIS, it seems like it would be issue with how IIS is rendering
the page. That's why I posted this to an IIS group.


Kristofer Gafvert
2/22/2005 8:24:35 AM
Hi,

Please make sure that your browser is not using a cached version of the
CSS file.

It is quite easy for IIS to "do this". IIS only needs to serve the files,
and the browser will then use the CSS file and html-file to show the page
in your browser. So if you can verify that something of the CSS file is
used, then the CSS file is downloaded to the client, and IIS has done its
job.

Can you also look in the IIS log file, and tell us what status code of the
requests for the CSS file(s) and html file(s).

--
Regards,
Kristofer Gafvert
www.gafvert.info - My Articles and help
www.ilopia.com


[quoted text, click to view]
mhj NO[at]SPAM w-link.net
2/23/2005 10:54:40 AM
Well, everything seems to be working fine now. I haven't the foggiest
notion why it works now and not before, the code hasn't changed, but
now all elements on the page update, including the anchors.

Thanks for everyone's feedback.


Mark J.



[quoted text, click to view]
AddThis Social Bookmark Button