fruitcake
08-21-2003, 09:42 AM
You know how you can add style="color: #FFFFFF" in your links, well that changes it for link, active, visited and hover, can you specify each of them without putting it in the <style> up in the header?
Thanks
Thanks
|
View Full Version : Hover color in <a tag? fruitcake 08-21-2003, 09:42 AM You know how you can add style="color: #FFFFFF" in your links, well that changes it for link, active, visited and hover, can you specify each of them without putting it in the <style> up in the header? Thanks duckgirl 08-21-2003, 12:38 PM I had this problem, too. You should search the forum first, but to specify individual links, you have to put it in the top code, with a marker linking down to the link at the bottom. You put this code, with your colors and decorations in the style tags, as you normally do for links. a.part1:link { text-decoration: none; color:#ff6699} a.part1:visited { text-decoration: none; color:#00ff00} a.part1:active { text-decoration: none; color:#cc99ff} a.part1:hover { text-decoration: none; color:#cc99ff} a.part2:link{text-decoration: none; color:#ff3333} a.part2:visited{text-decoration: none; color:#ffffcc} a.part2:active{text-decoration: none; color:#00ff99} a.part2:hover{text-decoration: none; color:#00ff99} Then, for your first link which you want to have the characteristics of the "part1" you add class="part1" to your <a> tag. For the links you want to be like part2, add class="part2". You can add as many of these parts as you want, just make sure you've specified what you want. So.... <a href="lala.html" class="part1">loo dee doo </a> <a href="lada.html" class="part2">moo mee moo </a> Those two links will have different hover colors and everything. If I wasn't clear, just tell me... but search the forum, there's lots on this subject. pb&j 08-21-2003, 03:54 PM you can put them in a seperate css page if you like instead of the header. you then have to put a link to the css page in your header section. can you explain the problem further if you cannot put the coding in the header section? kicker91 08-22-2003, 03:57 PM well, you could always put <a href="page.html" style="color:#000000; text-decoration:none;"> and that would make the link look black with no underline. Loren 08-22-2003, 04:21 PM How do you put a link to the CSS in the header? kittycat 08-22-2003, 04:33 PM Loren - check out the CSS page, it's on there ;) Loren 08-22-2003, 04:44 PM Thanks, I guess I should have looked first. :) duckgirl 08-22-2003, 11:35 PM well, you could always put <a href="page.html style="color:#000000; text-decoration:none;"> and that would make the link look black with no underline. Yeah, that works, but fruitcake wanted the hover on the links, and I know of no way to do that other than to specify it in the stylesheet. Hey, also... I know you put quotes like surrounding some things, but are the quotes in that tag right? cause you have one in front of page.html, but shouldn't you have one after, too? Hmm... I'm not really sure, I only do what I'm told. :) fruitcake 08-24-2003, 07:34 AM Originally posted by pb&j you can put them in a seperate css page if you like instead of the header. you then have to put a link to the css page in your header section. can you explain the problem further if you cannot put the coding in the header section? I want it to use in my signature at another message board. Their default link colour is this milky green. So I changed the link colour, but then it doesn't stand out like a link anymore. But if it changes on the hover, then it'll look more like a link. Originally posted by duckgirl Yeah, that works, but fruitcake wanted the hover on the links, and I know of no way to do that other than to specify it in the stylesheet. Hey, also... I know you put quotes like surrounding some things, but are the quotes in that tag right? cause you have one in front of page.html, but shouldn't you have one after, too? Hmm... I'm not really sure, I only do what I'm told. Yup, I wanted the hover :) There should be a quote before AND after "page.html" probably just a typo, but the kind of typo that'll screw up your page! :o duckgirl 08-24-2003, 07:46 AM Oh, wow... just now I noticed how fruitcake specified that the tags had to be out of the header... that took a while! :) |