Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > CSS: Nested div's and text color

CSS: Nested div's and text color
Thread Tools
Grizzled Veteran
Join Date: Jun 2001
Status: Offline
Reply With Quote
Mar 25, 2005, 11:53 PM
 
I've got a small problem that I think could probably be easily fixed, but I'm not sure how to do it. I have a containing div (for a row of items) and its standard text color is set to black, and it's :hover text color is white. Mouseover, and it changes as expected. Then what I want is to also have some grey text within that row div, and have it also change to white when rolled over. However, it seems that the only way to make the text color grey (and override the containing div's standard color) is to use another (smaller) div or span. However, that nested element does not respect the containing div's :hover text color. Now I realize there may be other ways to make grey text that turns white when the parent div is hovered over, but to complicate things, that grey text also needs to be positioned within the row. Follow all that? :-P
     
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Mar 26, 2005, 07:43 AM
 
English mother funker, do you speak it?



I think you're asking about this:

div.container { color: black }
div.container:hover { color: white }
div.container insideText { color: gray }
div.container:hover insideText { color: gray }
dov.containter insideText:hover { color: white }

Am I close to what you're getting at?
     
Grizzled Veteran
Join Date: Jun 2001
Status: Offline
Reply With Quote
Mar 28, 2005, 10:48 PM
 
It would probably be easier if I showed everyone what I'm doing.

http://68.46.142.101/wordpress/

If you notice in the Spotlight preview images, there is some grey text like "Top Hit" and "Documents" to the left of the list. If turning that grey text white when it and+or it's parent div is highlighted is not possible, then forget that.

Right now I'm attempting to tame an unordered list and make each li a full block like a menu item. however, in Safari, when the menu first shows up, things are terribly misaligned. When you type again, it fixes itself. Or if you highlight an item, it fixes itself. What the heck is causing this?

You can see where I'm going with this search, though. I just tried it in Firefox, and it mangles my form as well..so I'm not doing too great.

If someone could take a peek at my CSS and give me some pointers, it would be greatly appreciated.

Also - if what I'm doing can't be done in IE, I would like to simply disable the menu altogether.
     
Fresh-Faced Recruit
Join Date: Apr 2005
Location: Mpls, MN
Status: Offline
Reply With Quote
Apr 4, 2005, 01:55 AM
 
Your link isn't working so I'm flying blind here.

Right now I'm attempting to tame an unordered list and make each li a full block like a menu item.
A List Apart: Taming Lists is a very good article on how to create cross browser lists. Title seems to be exactly what you need.

I don't think your text hovering endeavor can be done with CSS alone, you may need to incorporate some Javascript in there.

Thus, creating the most ginormous can of whoop ass the world as ever seen.
     
   
Thread Tools
Forum Links
Forum 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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:22 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2