Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating Multiple Styles for a website

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have made a few websites in my time. Every time I make a website I use a &quot;<Style>&quot; in the header to make the all links be a certain color when the mouse hovers over them, clicks them, etc...

This was always useful until I ran into multiple backgrounds. I was always mad because the appointed link colors looked great on one background, but not another (hard to read white on yellow, and so on) in the same website.

This always made me mad because I could not find a way to get around using the same style scheme. My question is: Is there a way to have multiple styles on a single website. To re-phrase that for better understanding: Is it possible to have two different parts of a single page that have two different links colors (with two different hover colors, etc.)?

I hope somebody knows what I am talking about and has an answer for me. I would be very greatful for any help.
 
Try giving the links on the second background a different 'class'. eg

<a class=&quot;secondbg&quot; href=&quot;whereever.htm&quot;>jhg

you can then define a diffrent hover state to 'secondbg' eg

a.secondbg:hover {
background-color: #ffffff;
}

as well as the default hover bg colour

a:hover {
background-color: #00ffff;
}

Hope this helps

steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top