Forum Moderators: not2easy
<td><a href="http://www.mysite.com" class="menulink" class=&{ns4class};>Click here</a></td>
I understand that I have to look in the style sheet for the class called "menulink", and this is ok, but what is the "ns4class"? I didn't find that listed in the style sheet.
Thanks for your help,
May
Hmmm looks weird. i think it is safe to assume that "ns4" stands for netscape 4.x. Besides not being valid html i think the browser will render the first class and ignore the second.
The idea must be to serve different styles depending on browser, but there must be some browser detection in place. to complement this since it cant work by itself. Its not a very pretty solution, but i dont now how it works.
Kind Regards
Hafnius
CSS compliant browsers render the class "menulink" normally.
CSS deficient browsers like NS4 completely ignored the class "menulink".
It seems the presence of class=&{ns4class} cancels out the class="menulink".
If any one knows the mechanics of how this works let us know.
I do know that it follows the syntax of a calling a character entity, e.g., "&" (where "amp" is the entity)...so mabye they have a custom DTD with "{ns4class}" defined as an entity in it.
Jordan
Also I don’t think this was a code error
I think {ns4class} is just a note and class=& is a trigger that causes NS4 to throw out all defined classes in the link or where ever it’s used.
NS4 is the only older browser I have installed so I don’t know if this is effective in other browsers.
Try the code bellow in a CSS deficient browser and you can see its effectiveness.
<html>
<head>
<style type="text/css">
<!--
A.menulink {
display: block;
width: 198px;
text-align: left;
text-decoration: none;
font-family:arial;
font-size:12px;
color: #000000;
BORDER: none;
border: solid 1px #FFFFFF;
}
A.menulink:hover {
border: solid 1px #6100C1;
background-color:#F0E1FF;
}
-->
</style>
</head>
<body>
<table width=200>
<tr>
<td width="100%"><a href="#" class="menulink" class=&{ns4class};>Link</a></td>
</tr>
<tr>
<td width="100%"><a href=#" class="menulink" class=&{ns4class};>Link</a></td>
</tr>
</table>
<br>
<table width=200>
<tr>
<td width="100%"><a href="#" class="menulink";>Link</a></td>
</tr>
<tr>
<td width="100%"><a href="#" class="menulink";>Link</a></td>
</tr>
</table>
</body>
</html>