Different Links Color
Posted: 12 September 2006 01:46 PM   [ Ignore ]
Newbie
Rank
Total Posts:  8
Joined  2006-09-10

Hello, please bear with me, I am in the process of dumping tables as I find CSS so better. I have a question.
I have specified my links color in my CSS file, but I now I’ll like to change that color on a specific page that feeds off the same CSS. I know I can have two or as many different CSS files but how do you use that one CSS file and specify two different colors as your link? Hope I made myself clear. Any help would do.

Profile
 
 
Posted: 16 September 2006 12:16 AM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  3
Joined  2006-09-07

Hi sincejan63,

To use the same CSS file:

1) Define a new class for your link elements and use that to specify a new color in your CSS file.

/* Define a default color for all links */
a {
color: green;
}

/* Define a class and specify a different color */
.lnkChgColor{
color: blue;
}

2) Associate this class name with the link elements you want to change the color for in your HTML code.

<body>
Home
Family
</body>

Therefore the home link is blue and Family link is green.

That’s it in it’s simplest form. Have a play with it and see what you can do….

Profile
 
 
Posted: 28 October 2006 09:14 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  2
Joined  2006-10-28

Hello,

Just go through this site
http://www.echoecho.com/csslinks.htm

Best Regards

Profile
 
 
Posted: 29 October 2006 04:09 AM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  8
Joined  2006-09-10

Thank you Padawan, it works, I’ll now like to know how to load text files into a div using pure CSS, is that possible? I love CSS and I can do this in javascript but I want to know if it’s possible in CSS

Profile
 
 
Posted: 29 October 2006 06:37 PM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  10
Joined  2006-10-29
sincejan63 - 29 October 2006 04:09 AM

I’ll now like to know how to load text files into a div using pure CSS, is that possible?

no, it’s impossible

Profile
 
 
   
 
 
‹‹ mht extension      a little help ››