anchor tag issues

liunx

Guest
recently, ive been having some problems with the designs on my website. i was wondering if you could help me remove the line beneath a word inserted in an anchor tag. it goes something like this Home. Im an html lover but i havent mastered all its tags and their usage.It would help if you explained better what your trying to do, and whats wrongthanks for replying cj123. i really appreciate it. the thing is i would just like to get the code that will help me eliminate the line beneath a linkable word. let me put it this way <a href=http://www.webdeveloper.com/forum/archive/index.php/cj123.html>Home</a> once its viewed on an IE browser, what shows up is something like this Home
|
i want the underline removedthat is down to your style...

a
{
text-decoaration: none;
}

a:hover
{
text-decoration: underline;
}Are you using a stylesheet? Whether you have one or not, you can specify whether to have your links underlined or not. With CSS, you could even specify that all of the links on your Web site are underlined except for your anchor ones.

Are you going to be putting anchors on lots of pages on your Web site? If so, you'll definitely want to use one stylesheet for all of your pages to refer to. It will mean less code for you to write.

So if you have one, put this in it...

.anchor {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
.anchor:link {
text-decoration: none;
color: #000000;
font-weight: normal;
}
.anchor:active {
text-decoration: none;
color: #000000;
font-weight: normal;
}
.anchor:visited {
text-decoration: none;
color: #000000;
font-weight: normal;
}
.anchor:hover {
text-decoration: none;
color: #000000;
font-weight: normal;
}

Then in your html page where you put in all of your anchors, you'll want to add this to a href tag for EACH anchor: <a href=http://www.webdeveloper.com/forum/archive/index.php/"#anchorname" class="anchor">Home</a>

Now, in that css code I wrote down, you'll want to customize the hexidecimal colors. I set them all to black #000000 so you'll want to change them to whatever the link colors are for your Web site. You'll need to change the font too if you're not using arial. The key is that where it says text decoration, you want "none" if you don't want it to be underlined. If you do want it to be underlined, you would write "underline".

Hope this helps. Let me know if you need any further help.

Also, if you do not use a stylesheet and you just are doing anchors for one page, let me know because there's a much simpler solution. You could simply put the css stuff in the head section of your page and then basically do the same thing. I'd have to test it out as I think there's a another line of code you need in there.

Let me know if all this works. I tested it with my Web site and it worked. But let me know. :o)Are you using a stylesheet? Whether you have one or not, you can specify whether to have your links underlined or not. With CSS, you could even specify that all of the links on your Web site are underlined except for your anchor ones.

Are you going to be putting anchors on lots of pages on your Web site? If so, you'll definitely want to use one stylesheet for all of your pages to refer to. It will mean less code for you to write.

So if you have one, put this in it...

.anchor {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
.anchor:link {
text-decoration: none;
color: #000000;
font-weight: normal;
}
.anchor:active {
text-decoration: none;
color: #000000;
font-weight: normal;
}
.anchor:visited {
text-decoration: none;
color: #000000;
font-weight: normal;
}
.anchor:hover {
text-decoration: none;
color: #000000;
font-weight: normal;
}

Then in your html page where you put in all of your anchors, you'll want to add this to a href tag for EACH anchor: <a href=http://www.webdeveloper.com/forum/archive/index.php/"#anchorname" class="anchor">Home</a>

Now, in that css code I wrote down, you'll want to customize the hexidecimal colors. I set them all to black #000000 so you'll want to change them to whatever the link colors are for your Web site. You'll need to change the font too if you're not using arial. The key is that where it says text decoration, you want "none" if you don't want it to be underlined. If you do want it to be underlined, you would write "underline".

Hope this helps. Let me know if you need any further help.

Also, if you do not use a stylesheet and you just are doing anchors for one page, let me know because there's a much simpler solution. You could simply put the css stuff in the head section of your page and then basically do the same thing. I'd have to test it out as I think there's a another line of code you need in there.

Let me know if all this works. I tested it with my Web site and it worked. But let me know. :o)Mistress, I tried your css above and it seems to work very well. I have a question, though.

If I make each state a different color, is there a way to show active links in the "active" color even if they have also been "visited" already?

In other words, I go to link A. It shows the "active" color until I leave. Then it shows the "visited" color. If I go back to it again, it still shows the "visited" color even though it is once again "active." Any way to show it as "active" or is this controlled by the cascade?

Thanks.The order of the pseudo-states is wrong, it should be:

.anchor:link {
text-decoration: none;
color: #000000;
font-weight: normal;
}
.anchor:visited {
text-decoration: none;
color: #000000;
font-weight: normal;
}
.anchor:hover {
text-decoration: none;
color: #000000;
font-weight: normal;
}
.anchor:active {
text-decoration: none;
color: #000000;
font-weight: normal;
}Ah HA! :)

Thanks, Ryan. I'd forgotten the "LoVeHAte" thing.thx to all who responded to my post. im beginning to love this site!!!!!!!!:)hello! i hvent visited this site in a month now so i would jst like to take this opportunity to ask something with regard to frameset. i have no idea what frameset is so i want its definition and examples from you who knows the frameset tag and its attributes.

thanks in advance
 
Back
Top