Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-26-2007, 07:16 PM   PM User | #1
Webfoot
New to the CF scene

 
Join Date: Jun 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Webfoot is an unknown quantity at this point
a:hover conflict

I have placed a small text/css script in the head of my index.htm:

<style type="text/css">
<!--
A:hover { COLOR: red; font-weight: none }
-->
</style>

which successfully changes the links on my page to red on mouseover. However, I also have an external CSS script for a vertical dropdown menu on the same page which contains a command for hover, as follows:

.glossymenu li a:hover{
background: aqua;
}

This command also works successfully to change the sub-menu links on the vertical dropdown menu to aqua color on mouseover.

The conflict is this: The A:hover for color:red is affecting the links in the dropdown menu. They not only change background color to aqua on mouseover, most the text of them (not all of them) turn red simultaneously.

So, the question becomes "How can I have my cake and eat it too?" In other words: What do I need to do so that only those links which are not part of the vertical menu turn red on mouseover? This is baffling.

Thank you one and all.
Webfoot is offline   Reply With Quote
Old 07-26-2007, 07:22 PM   PM User | #2
Jutlander
Regular Coder

 
Jutlander's Avatar
 
Join Date: Jun 2007
Location: In my own sick little world :P
Posts: 425
Thanks: 1
Thanked 12 Times in 12 Posts
Jutlander is on a distinguished road
First off, you've forgotten a semicolon right after font-weight: none.

Can you please post all of your code. That will make it easier to get the bigger picture.
__________________
.
.
Jutlander is offline   Reply With Quote
Old 07-26-2007, 07:34 PM   PM User | #3
lithriel
New Coder

 
Join Date: Jul 2007
Location: USA
Posts: 83
Thanks: 6
Thanked 7 Times in 7 Posts
lithriel is on a distinguished road
Seems to me that the easy solution would be to declare a color for .glossymenu
links.

.glossymenu li a:hover { background: aqua; color: #000;}

P.S. Jutlander, the semicolon is not required after the last declaration at the end of a declaration block. It's actually optional.

Last edited by lithriel; 07-26-2007 at 07:37 PM..
lithriel is offline   Reply With Quote
Old 07-26-2007, 07:48 PM   PM User | #4
Jutlander
Regular Coder

 
Jutlander's Avatar
 
Join Date: Jun 2007
Location: In my own sick little world :P
Posts: 425
Thanks: 1
Thanked 12 Times in 12 Posts
Jutlander is on a distinguished road
Quote:
Originally Posted by lithriel View Post
P.S. Jutlander, the semicolon is not required after the last declaration at the end of a declaration block. It's actually optional.
I don't know, but it is good practice and will leave the most minimal margin for error, possible.
__________________
.
.
Jutlander is offline   Reply With Quote
Old 07-26-2007, 08:52 PM   PM User | #5
Webfoot
New to the CF scene

 
Join Date: Jun 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Webfoot is an unknown quantity at this point
I've gone with the easy way, thanks to lithriel. And it works like a charm! Thank you thank you.

Case closed.
Webfoot is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:08 AM.


Advertisement
Log in to turn off these ads.