There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell display driver drivers email error excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware network networking nvidia outlook outlook 2003 outlook express partition printer problem ram router slow sound sprtcmd.exe trojan usb video virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Multiple Hyperlink CSS Colour Styles


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Roblobob's Avatar
Senior Member with 181 posts.
 
Join Date: May 2004
Location: UK
Experience: Intermediate
28-Jan-2006, 07:56 PM #1
Exclamation Multiple Hyperlink CSS Colour Styles
I'm making a website using Dreamweaver MX 2004 and I'm using the following code to colour my hyperlinks: -

----------
<style type="text/css">
<!--
.style1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 18px;
}
.style2 {font-family: Verdana, Arial, Helvetica, sans-serif}
body {
background-color: #CCCCCC;
}
.style3 {
font-size: 14px;
color: #FFFFFF;
}
a:link {
color: #FFFFFF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FFFFFF;
}
a:hover {
text-decoration: none;
color: #000000;
}
a:active {
text-decoration: none;
color: #666666;
}

.style4 {font-size: 12px; color: #FFFFFF; font-family: Verdana, Arial, Helvetica, sans-serif; }
.style7 {font-size: 16px}
-->
</style>
----------

On my navigation bar they look fine but the links on the main body of the page are invisible as I've coloured hyperlinks white on CSS. I am unable to recolour the links in the main body of the page. I want keep the links in the navigation with the same colours but make the links in the main body of the page blue. How can I do this without affecting the navigation bar links and maintain mouseover colour changes?

Thanks.
__________________
My rig:-
Windows XP SP2 / Ubuntu
AMD Athlon XP 2800+ Barton OC'd to 3200++ (12.5 x 184 = 2,300MHz)
Gigabyte nForce 2 "7N400E-L"
Crucial 1GB (512MB x2) DDR400
PNY Geforce 6 6600GT 128MB AGP
Western Digital SE 80GB 8MB Cache
Antec SmartPower 400watt
1Mbps ADSL
Rockn's Avatar
Computer Specs
Distinguished Member with 17,888 posts.
 
Join Date: Jul 2001
Location: Mexico of the North, MN
Experience: Disenfranchised American Male
30-Jan-2006, 08:48 PM #2
Use ID tags for your elements and call them in CSS.

<style type="text/css">
<!--
{
#bluelink a:link {
color: #0000FF;
text-decoration: none;
}
#bluelink a:visited {
text-decoration: none;
color: #0000FF;
}
#bluelink a:hover {
text-decoration: none;
color: #0000FF;
}
a:active {
text-decoration: none;
color: #666666;
}

<a href="whatever.com" ID="bluelink">Link</a>

You could also put it inside of a div and give the div ID="bluelink" lots of ways to accomplish it.
__________________
**Disclaimer** Anything below this line ^ is part of my signature for those that may be confused

Sadly, there are no integers on this scale, so your gangly adolescent attempt to be clever has proved futile....Dieter

I have the right "NOT" to be tolerant of others because they are different, weird, or tick me off.....Parody of Andy Rooney

There are no stupid questions, but there are a LOT of inquisitive idiots.
dmurfitt's Avatar
Senior Member with 618 posts.
 
Join Date: Nov 2002
31-Jan-2006, 02:00 AM #3
I agree, but it may be better to use classes (instead of IDs) incase you want to use the same link stlye more than once on each page.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 07:52 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.