PDA

View Full Version : PROBLEMS: link colors



tomcraig5
Apr 26th, 2009, 07:40 PM
I'm having trouble trying to resolve a minor issue with the color scheme for the text links of my web site.

There are text-based links in more than one part of the site, and these links are set against different colors (tan, white, and green). Setting the link colors inside the body tag (alink= vlink= link=) didn't go well because, the color scheme that works for the green background didn't work for other areas of the site.

I'm sure there's a simple answer to this, and I'll welcome any assistance. And I'll be happy to provide any additional information if needed.

bdl
Apr 26th, 2009, 07:53 PM
Welcome to the forums.

So you're saying that you have a uniform link color scheme that doesn't mesh with a non-uniform background on different pages / sections, correct? I'd recommend using a class for the specific document or section and then the anchor class can inherit from that, e.g.



.somesection { color: #000; background-color: #e8e8e8; }
.somesection a { color: #0000ff; }
.othersection { color: #fff; background-color: #ff0000; }
.othersection a { color: #fff }




<div class="somesection">
<p><a href="#">Link 1</a></p>
</div>
<div class="othersection">
<!-- etc -->
</div>


Ok, so maybe those color combos aren't the best, but they illustrate my point. :)

tomcraig5
Apr 26th, 2009, 08:36 PM
Thanks for the prompt reply. I'll welcome the help.

If possible, I'm trying to think of a simple solution that won't involve style sheets. Two other people working on this site only have HTML skills, so I need to keep this as simple as possible. I'll welcome any help with that.

bdl
Apr 26th, 2009, 09:12 PM
If possible, I'm trying to think of a simple solution that won't involve style sheets. Two other people working on this site only have HTML skills, so I need to keep this as simple as possible. I'll welcome any help with that.

Usng some basic CSS in the document HEAD won't kill you. Using outdated non-web-standards inline color attributes may. ;)

Rowsdower!
Apr 27th, 2009, 03:05 PM
Thanks for the prompt reply. I'll welcome the help.

If possible, I'm trying to think of a simple solution that won't involve style sheets. Two other people working on this site only have HTML skills, so I need to keep this as simple as possible. I'll welcome any help with that.

Without style sheets (or at least placing style tags in the header as suggested) I don't know of any way to accomplish this without coding each link with inline CSS style -- which would be very tedious.

CSS was designed for problems like yours and the syntax is probably the easiest I've ever seen. Give some serious thought to having your other coders spend 20 minutes studying here (http://www.w3schools.com/css/default.asp). I guarantee it would pay off!