PDA

View Full Version : Using a second set of styles for specific sections


AshleyQuick
01-19-2003, 12:47 AM
Here's what one of my hrefs looks like now:

<A HREF="help.asp" STYLE="font-family: verdana, optima, arial, sans-serif; color:#000000; font-size:10px; font-weight:bold; text-decoration:none">

I need to do this because I do not want this particular set of links to change color. Incidentally, it would seem that there is an alternative to embedding the style in each href. Isn't there a way to make the links stay black for this section only?

Ash

Catman
01-19-2003, 02:33 AM
In the head portion of your file, create a style section like this:

<style class="text/css">
<!--
a.nochange {
background : transparent;
color : #000000;
font-family : Verdana, Optima, Arial, sans-serif;
font-size : 10px;
font-weight : bold;
text-decoration : none;
}
-->
</style>


Then for your link, do this:

<a href="help.asp" class="nochange">

justame
01-19-2003, 03:36 AM
/me just a whispers® to ash...
ummm did you post this same kinda just a question® in some other forum??? /me thought /me posted just a reply® 'bout using just a different® 'class' for some 'div' to go with your 'global.css'???

/me knowsss /me still isnt programmed to think n' wonders ifin' this is just a moreproof® of it...lol...

AshleyQuick
01-19-2003, 01:28 PM
Cat, thanks but that didn't work.

I couldn't get the div to work either. =/

---

Here's a test page:

http://home1.gte.net/~dsean/misc/test.html

I want the links to look like Test Link 1 but, if you'll look at the code, you'll see I'm using a style for each href when it seems there should be a more efficient way. I hope this better illustrates the dilemma? Thanks..

Ash

AshleyQuick
01-23-2003, 04:15 PM
Could someone please take a look? =/

Ash

ronaldb66
01-24-2003, 08:29 AM
... did you notice the ' class="nochange" ' attribute in Catmans example code? It isn't on your page...