Unstoppable Domains โ€” AI Assistant

CSS hyperlinks different colors, different places?

Spaceship Spaceship
Watch
Impact
0
Hi,

Hopefully this will be a simple question for the members of this forum: I have placed a number of my hyperlinks / navigation on a dark background - therefore they are all light colors. Now, I want to put additional hyperlinks throughout the site on a white background. I am still using tables throughout the site but is there a way to do this using my external CSS style sheet and the DIV tag?

Any help is greatly appreciated.

Thanks.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Hi Historica,

The short answer is yes, it's possible. There are probably many ways to accomplish this goal.

One such way is to use DIV id's.

For instance, your CSS could look like this:

Code:
#dark a { color: white; }
#light a { color: black; }
a:link, a:visited, a:active {text-decoration:none;}
a:hover {text-decoration: underline;}

And your HTML could be:
Code:
<DIV id="dark">
   <a href="#">This Link is white, </a>
</div>
<DIV id="light">
   <a href="#">and this one is black.</a>
</div>
 
0
•••
Domain Recover
DomainEasy โ€” Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back