css and hyperlink properties

K

kelly

I'm trying to control the look of some links in my page through the CSS, but
the changes are not sticking.
My hyperlinks are set to be blue; I want a particular set of links to be
green without the usual underline. I've used the following line of code in
the CSS:

h3 { font-family:Arial; font-weight:bold; font-size:10pt;
text-decoration:none; color: #CCFFCC; margin-top:0; margin-bottom:0; }

The links remain blue and underlined. Is there a fix for the CSS, or do I
have to apply the changes on a line-by-line basis?
Thanks for your suggestions--this group is very helpful.
kelly
 
S

Steve Easton

You need to apply the style for the hyperlink to the a tag

Start with this

h3{
font-family:Arial;
font-weight:bold;
font-size:10pt;
margin-top:0;
margin-bottom:0;
}


Then specify the a tag within h3

h3 a:link {
color: #CCFFCC;
text-decoration:none;
}


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
K

kelly

Clearly I still have a lot to learn about CSS, but your answer did the trick.
Thanks a lot for your help.
kelly
 
S

Steve Easton

You're welcome.
Ask all you want.

It can be a little tricky.
Most people have a tendency to make their CSS a little more compact than I do, but I like
things separated, because to me it's easier to follow.

If you want your links to change color when hovered clicked or to show as having been
visited check out.

h3 a:visited{
{

h3 a:active {
}

h3 a:hover{
}


and apply them in that exact order.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top