PDA

View Full Version : question in CSS


chelvis
02-14-2003, 03:41 PM
I have a cascading file which I pasted below.

In my webpages, the links are underlined all the time. But I want the links to be not underlined and it should become underlined only when a user puts his mouse over a link. How can I modify my css file?


A.SmBlueLink:link {font-size: 10px; font family:arial,verdana,geneva; color:#0000FF;}
A.SmBlueLink:active {font-size: 10px; font-family:arial,verdana,geneva; color:#FF0055;}
A.SmBlueLink:visited {font-size: 10px; font-family:arial,verdana,geneva; color:#800080;}

landon11
02-14-2003, 03:48 PM
A.SmBlueLink:link {font-size: 10px; font family:arial,verdana,geneva; color:#0000FF; text-decoration: none}
A.SmBlueLink:active {font-size: 10px; font-family:arial,verdana,geneva; color:#FF0055; text-decoration: none}
A.SmBlueLink:visited {font-size: 10px; font-family:arial,verdana,geneva; color:#800080; text-decoration: none;}
A.SmBlueLink:hover{font-size: 10px; font-family:arial,verdana,geneva; color:#800080; text-decoration: underline;}

redhead
02-14-2003, 03:49 PM
try this:

<style>
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>

also... if you take a look at your style you posted, thats only going to work on links that have class="SmBlueLink" in their tag...

does that help? any problems? :thumbsup:

beaten... nooo... ;)

chelvis
02-14-2003, 04:32 PM
It did work fine with the underlining part in IE. But in NN when I hover over a link it is not getting underlined. Is there a way to make it work in NN?

I created the .css file and in my html I did like follows:

<a CLASS="LgBlueLink" href="some.html">This is a link</a>

cg9com
02-14-2003, 06:40 PM
are you using the <link> element to refer to the external css file?

the css posted above will work, perhaps you just typoed something? maybe post a few bits of code pertaining to your question ...

chelvis
02-14-2003, 06:58 PM
Here is part of my html code:

<form name="clip" method="post">
<table border="0" width="475" height="200" cellspacing="0" cellpadding="0">
<!--INSERT CONTENT HERE-->

<tr><td valign="top" colspan="4">&nbsp; &nbsp; <a CLASS="MedBlackText">8 matching terms found</a></td></tr>
<tr><td valign="top" height="5" colspan="4"><img src="images/spacer.gif" border="0" height="5"></td></tr>
<tr><td valign="top" width="55" height="1"><img src="images/spacer.gif" border="0" width="55" height="1"></td><td valign="top"><a CLASS="SmBlackText"><u><b>Terms</b></u></a></td><td valign="top" width="8" align="left"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top" align="left"><a CLASS="SmBlackText"><u><b>Select</b></u></a> <a href="#"><img src="images/help_small.gif" border="0"></a></td><td valign="top" width="8" align="left"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top" align="left"><a CLASS="SmBlackText"><u><b>Explode</b></u></a> <a href="#"><img src="images/help_small.gif" border="0"></a></td></tr>
<tr><td valign="top" width="55" height="1"><img src="images/spacer.gif" border="0" width="55" height="1"></td><td valign="top"><a CLASS="LgBlueLink" href="#">Avalanche diodes</a></td><td valign="top" width="8" align="left"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top" align="left"><input type="checkbox" name="0" checked></td><td valign="top" width="8"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top"><input type="checkbox" name="00"></td></tr>
<tr><td valign="top" width="55" height="1"><img src="images/spacer.gif" border="0" width="55" height="1"></td><td valign="top"><a CLASS="LgBlueLink" href="#">diodes</a></td><td valign="top" width="8" align="left"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top" align="left"><input type="checkbox" name="1" checked></td><td valign="top" width="8"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top"><input type="checkbox" name="01"></td></tr>
<tr><td valign="top" width="55" height="1"><img src="images/spacer.gif" border="0" width="55" height="1"></td><td valign="top"><a CLASS="LgBlueLink" href="#">electron tube diodes</a></td><td valign="top" width="8" align="left"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top" align="left"><input type="checkbox" name="2"></td><td valign="top" width="8"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top"><input type="checkbox" name="01"></td></tr>
<tr><td valign="top" width="55" height="1"><img src="images/spacer.gif" border="0" width="55" height="1"></td><td valign="top"><a CLASS="LgBlueLink" href="#">gunn diodes</a></td><td valign="top" width="8" align="left"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top" align="left"><input type="checkbox" name="3" checked></td><td valign="top" width="8"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top">&nbsp; </td></tr>
<tr><td valign="top" width="55" height="1"><img src="images/spacer.gif" border="0" width="55" height="1"></td><td valign="top"><a CLASS="LgBlueLink" href="#">impatt diodes</a></td><td valign="top" width="8" align="left"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top" align="left"><input type="checkbox" name="4"></td><td valign="top" width="8"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top"><input type="checkbox" name="01"></td></tr>
<tr><td valign="top" width="55" height="1"><img src="images/spacer.gif" border="0" width="55" height="1"></td><td valign="top"><a CLASS="LgBlueLink" href="Thesaurus_fullrecord1.html">light emitting diodes</a></td><td valign="top" width="8" align="left"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top" align="left"><input type="checkbox" name="4" checked></td><td valign="top" width="8"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top"><input type="checkbox" name="01"></td></tr>
<tr><td valign="top" width="55" height="1"><img src="images/spacer.gif" border="0" width="55" height="1"></td><td valign="top"><a CLASS="LgBlueLink" href="#">limited space charge accumulation</a></td><td valign="top" width="8" align="left"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top" align="left"><input type="checkbox" name="5" checked></td><td valign="top" width="8"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top"><input type="checkbox" name="01"></td></tr>
<tr><td valign="top" width="55" height="1"><img src="images/spacer.gif" border="0" width="55" height="1"></td><td valign="top"><a CLASS="LgBlueLink" href="#">photodiodes</a></td><td valign="top" width="8" align="left"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top" align="left"><input type="checkbox" name="6" checked></td><td valign="top" width="8"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top">&nbsp; </td></tr>
<tr><td valign="top" width="55" height="1"><img src="images/spacer.gif" border="0" width="55" height="1"></td><td valign="top"><a CLASS="LgBlueLink" href="#">plasma diodes</a></td><td valign="top" width="8" align="left"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top" align="left"><input type="checkbox" name="7" checked></td><td valign="top" width="8"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top"><input type="checkbox" name="01"></td></tr>
<tr><td valign="top" width="55" height="1"><img src="images/spacer.gif" border="0" width="55" height="1"></td><td valign="top"><a CLASS="LgBlueLink" href="#">schkotty barrier diodes</a></td><td valign="top" width="8" align="left"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top" align="left"><input type="checkbox" name="8" checked></td><td valign="top" width="8"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top"><input type="checkbox" name="01" checked></td></tr>
<tr><td valign="top" width="55" height="1"><img src="images/spacer.gif" border="0" width="55" height="1"></td><td valign="top"><a CLASS="LgBlueLink" href="#">semiconductor diodes</a></td><td valign="top" width="8" align="left"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top" align="left"><input type="checkbox" name="9"></td><td valign="top" width="8"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top"><input type="checkbox" name="01"></td></tr>
<tr><td valign="top" width="55" height="1"><img src="images/spacer.gif" border="0" width="55" height="1"></td><td valign="top"><a CLASS="LgBlueLink" href="#">tunnel diodes</a></td><td valign="top" width="8" align="left"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top" align="left"><input type="checkbox" name="10"></td><td valign="top" width="8"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top"><input type="checkbox" name="01"></td></tr>
<tr><td valign="top" width="55" height="1"><img src="images/spacer.gif" border="0" width="55" height="1"></td><td valign="top"><a CLASS="LgBlueLink" href="#">zenner diodes</a></td><td valign="top" width="8" align="left"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top" align="left"><input type="checkbox" name="11"></td><td valign="top" width="8"><img src="images/spacer.gif" border="0" width="8"></td><td valign="top"><input type="checkbox" name="01"></td></tr>
<tr><td valign="top" colspan="4" height="4"><img src="images/spacer.gif" border="0" height="4"></td></tr>

</table>

Roy Sinclair
02-14-2003, 07:39 PM
Originally posted by chelvis
It did work fine with the underlining part in IE. But in NN when I hover over a link it is not getting underlined. Is there a way to make it work in NN?

I created the .css file and in my html I did like follows:

<a CLASS="LgBlueLink" href="some.html">This is a link</a>

If by NN you mean that obsolete v4.x browser vs the modern v6 or v7 browser then you need to understand that obsolete browsers don't handle standards that were developed after they were written.