3 replies [Last post]
Kdrive
Offline
newbie
Alexandria, VA
Last seen: 17 years 44 weeks ago
Alexandria, VA
Joined: 2004-09-01
Posts: 2
Points: 0

Hi all...if anyone answers my question, please assume I know little to nothing about CSS - I literally just started using it yesterday.

I have a site where I have used background images for my navigation, and want to overlay text rather than just create graphical navigation buttons (as a web marketing person I always prefer text over graphics). My background buttons are pink, so I would like the text for the navigation to be white, without underlines. However, I want the rest of the links on the page to be default blue text with underline.

I created a .css file, creating one class (please pardon my syntax if I'm getting it wrong) for the navigation (no text decoration, white) and another for the rest of the page (only specifying the font, nothing else).

I inserted the class for the navigation into the anchor tags (i.e. <A href="/example.htm class="navlinks">.

For the rest of the page, I put a span tag like so
<p><span class="body">
text of page with some <a href="/example2.htm>links</a>
</span>
</p>.

Well, the links for the page are still white like the navigation, not blue and underlined. What am I doing wrong?

I looked at a site who had a similar style, with navigation text in white and the rest of the linked text in blue with underlines, and judging by their code, all they used was a <span> tag like I did.

Thanks all!!

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 8 years 18 weeks ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

changing link colors, decorations

Hard to tell what's wrong without seeing the CSS, but it should look something like this:

a.navlink {
color: white;
text-decoration: none;
}

You don't need to <span> the rest of the links. Do nothing and they will appear as normal (blue and underlined)
On the nav links just use class="navlink" in the <a> tag (like you were), and do nothing for the other anchors
It's that simple.

Kdrive
Offline
newbie
Alexandria, VA
Last seen: 17 years 44 weeks ago
Alexandria, VA
Joined: 2004-09-01
Posts: 2
Points: 0

Thanks

Thanks wolf....I'll give that a try. I may have tried it already and it didn't work, but if that's the case, I'll look into the versions of Dreamweaver and Netscape I am using as possible culprits. I can't use IE at home because of a nasty malware problem that I can't seem to eradicate, so I'm stuck with Netscape as my only browser for now.

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 10 weeks 3 days ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

changing link colors, decorations

Quote:
I can't use IE at home because of a nasty malware problem that I can't seem to eradicate, so I'm stuck with Netscape as my only browser for now.

What a [email protected] shame Laughing out loud

You could always use Mozilla, or Firefox.

Verschwindende wrote:
  • CSS doesn't make pies