| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| New Member Join Date: Jun 2006 Location: USA
Posts: 4
![]() | CSS hyperlinks different colors, different places? 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. |
| |
| | #2 (permalink) |
| New Member Join Date: May 2006 Location: Texas
Posts: 21
![]() | 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;} ????: NamePros.com http://www.namepros.com/programming/210052-css-hyperlinks-different-colors-different-places.html Code: <DIV id="dark"> <a href="#">This Link is white, </a> </div> <DIV id="light"> <a href="#">and this one is black.</a> </div>
__________________ Heroes Forum & Lounge |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |