css through an external CSS to a link

admin

Administrator
Staff member
i was trying to apply some css style to a link through an external style sheet, but it won't work. i know the page is linked to the external sheet, so it's in the code.

this is on the external sheet:



font.topnav a {font-family:arial; font-size:10pt; letter-spacing:1px; color: black; text-decoration:none}

a.topnav2 {font-family:arial; font-size:10pt; letter-spacing:1px; color: black; text-decoration:none}

td.topnav a {font-family:arial; font-size:10pt; letter-spacing:1px; color: black; text-decoration:none}


those are the three i tried. finally it worked with the td one, but is it possible to apply css with a CLASS via font. or a.?





here's the code i applied it to, with the class in the td tag, not the font tag like i had hoped would work.

<TD CLASS="topnav"><FONT><A HREF=http://www.webdeveloper.com/forum/archive/index.php/"../../index.htm">HOME</A></FONT></TD>I tried this and it works fine for me:


<style type="text/css">

.myClass {
color: black;
font-family: Arial;
font-size: 10pt;
letter-spacing: 1px;
text-decoration: none; }

</style>

</head>
<body>

<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://forums.webdeveloper.com/" class="myClass">My Link</a>!<br />
<font class="myClass">My Font</font>even that one didn't work for me. i just want to be able to put the class name in the FONT tag and have it refer to the external .css sheet. anyone?http://htmlgoodies.com/tutors/ie_style.html
<!-- m --><a class="postlink" href="http://www.w3schools.com/css/css_howto.asp">http://www.w3schools.com/css/css_howto.asp</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.westciv.com/style_master/academy/css_tutorial/introduction/integration.html">http://www.westciv.com/style_master/aca ... ation.html</a><!-- m -->

I'm too lazy to search for anymore...Originally posted by calrockx
even that one didn't work for me. i just want to be able to put the class name in the FONT tag and have it refer to the external .css sheet. anyone?
Forget you ever heard of a <font> tag and then think about how you should do it. <font> is deprecated, not needed and anachronistic when you're using CSS. Put the font definitions into the tag selectors like:

a {font-family:arial; font-size:10pt; letter-spacing:1px; color: black; text-decoration:none}Originally posted by ray326
Forget you ever heard of a <font> tag and then think about how you should do it. <font> is deprecated, not needed and anachronistic when you're using CSS...

Eh...<font> tag, you say? What is this <font> tag?

:D


Anyhoo, I agree.
<font> == Bad!
 
Back
Top