4 replies [Last post]
gsusong
Offline
newbie
Last seen: 14 years 5 weeks ago
Joined: 2007-10-24
Posts: 2
Points: 0

Please be patient, as I am very new at this.

I need to change how the links look only inside a single table within a page. This is how they are set in the css file that loads with the page:

a:link {
color: #1e1eb1;
text-decoration: none
} /* unvisited link */

a:visited {
color: #1e1eb1;
text-decoration: none
} /* visited link */

a:hover {
color: red;
text-decoration: underline
} /* mouse over link */

a:active {
color: #0000FF
} /* selected link */

But within a single table on that page, I need them to be underlined. Thanks in advance for your help.

soundscape
soundscape's picture
Offline
Enthusiast
Kansas City Metro
Last seen: 21 weeks 6 days ago
Kansas City Metro
Timezone: GMT-7
Joined: 2007-10-18
Posts: 188
Points: 0

One way is to create a

One way is to create a unique style, for example:

.unique a:link, .unique a:visited, .unique a:hover, .unique a:active {
text-decoration: underline;
}

Then put the links that are inside the table, inside of div or span tags:
link
or

"Unique" isn't very descriptive, so you can come up with a more meaningful name to you.

You might need to specify the colors, I can't remember how the inheritance works offhand. If the above doesn't have the correct colors, then you would use:

.unique a:link, .unique a:visited {
color: #1e1eb1;
text-decoration: underlined;
}

.unique a:hover {
color: red;
text-decoration: underlined;
}

.unique a:active {
color: #0000FF;
text-decoration: underlined;
}

Make sense?

~Ken

~Soundscape
www.kenlange.com

Triumph (not verified)
Anonymous's picture
Guru

soundscape wrote:<span

soundscape wrote:
link

Why do it that way when link uses less code. Of course an even better way of doing it would be to add an id to the parent (which is a table in this case...uhh...nevermind)

link Then #unique a { whatever}

You're not using that table for layout are you? Wink

soundscape
soundscape's picture
Offline
Enthusiast
Kansas City Metro
Last seen: 21 weeks 6 days ago
Kansas City Metro
Timezone: GMT-7
Joined: 2007-10-18
Posts: 188
Points: 0

Yeah, Triumph's example

Yeah, Triumph's example would be a more efficient way.

~Soundscape
www.kenlange.com

gsusong
Offline
newbie
Last seen: 14 years 5 weeks ago
Joined: 2007-10-24
Posts: 2
Points: 0

Wonderful!!! Thank you both!

Wonderful!!! Thank you both!