Consolidating classes

liunx

Guest
This should be so easy, but for the life of me I can not figure it out.

This is one class I have set up:


A.pinktext:link
{ text-decoration: none; color:#F1EBCB; font-weight:bold}
A.pinktext:visited
{ text-decoration: none; color:#F1EBCB; font-weight:bold}
A.pinktext:active
{ text-decoration: none; color:#F1EBCB; font-weight:bold}
A.pinktext:hover
{ text-decoration: none; color:#F1EBCB; font-weight:bold}

.pinktext
{
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #F1EBCB;
font-size: 8pt;
letter-spacing: 1pt;
font-weight: 500
}



So I would think that the links within <div class="pinktext" would show up with the attributes set for them, but they don't. I have to tack that class="pinktext" into every link, so the code turns out like this:


<div class="pinktext">
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.htmlgoodies.com" class="pinktext">HTML Goodies</a>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.anotherlink.com" class="pinktext">Another Link</a>
</div>


If I don't set the class within the link tag, the formatting is not applied. This is especially a pain when I am trying to convert old pages. I have to set go through and all the class to every link in the text. I know that this is not how things are suppose to work, but can't seem to find a fix.

If anyone can help me, even if it is just a link to something that may help, I would really, really appriciate it. Thanks!

Also, i know this isn't PHP, but I think that putting the code within the PHP board tag makes them much easier to read.Try this:

...
.pinktext a:link { color: blue; }
...
<div class=pinktext><p><a href=http://www.webdeveloper.com/forum/archive/index.php/"blahblah">link</a></p></div>
...NogDog >>

Holy cow! That was WAY too easy! Thanks so much.

And your sig made my day.A.pinktext:link
{ text-decoration: none; color:#F1EBCB; font-weight:bold}
A.pinktext:visited
{ text-decoration: none; color:#F1EBCB; font-weight:bold}
A.pinktext:active
{ text-decoration: none; color:#F1EBCB; font-weight:bold}
A.pinktext:hover
{ text-decoration: none; color:#F1EBCB; font-weight:bold}
Remember to keep your anchor definitions in this order: link, visited, hover, active.Originally posted by ChibiTi
NogDog >>

Holy cow! That was WAY too easy! Thanks so much.

And your sig made my day.
Glad to help. Glad to see there are other web developers who know a little about quantum physics, too. :)*sigh* Back to square one.



.pinktext
{
font-family: Verdana, Arial, Helvetica, sans-serif;
-blah blah blah-
}

.pinktext a:link
{ text-decoration: none; color:#F1EBCB; font-weight:bold}
-blah blah blah-



It only reads the last set. If I put the general formatting info last, it picks that up. If I put the link info last, it formats the links properly.
 
Back
Top