isaac_cm Posted September 3, 2007 Share Posted September 3, 2007 Hello, I wonder if this situation is possible in CSS I have this rule it is assigned to div tag: #maincontent a:hover, #maincontent a:active, #maincontent a:focus { background-color: #FFCC00; color: #990000; text-decoration: none; } but I want it to apply to every element inside that div except for img tags, any idea ? thanks Link to comment https://forums.phpfreaks.com/topic/67778-solved-exclude-element/ Share on other sites More sharing options...
wildteen88 Posted September 3, 2007 Share Posted September 3, 2007 The css above will only apply to anchor tags (<a href="#"></a> only, and not very element within #maincontent. Link to comment https://forums.phpfreaks.com/topic/67778-solved-exclude-element/#findComment-340642 Share on other sites More sharing options...
isaac_cm Posted September 3, 2007 Author Share Posted September 3, 2007 I have a dive <div id="maincontent"> the problem that even img tags inside div get a background changed on mouse hover I dont want that , the images used for navigation so they sounded by anchor tags do I have to individually assign to those img a new rule ? thanks Link to comment https://forums.phpfreaks.com/topic/67778-solved-exclude-element/#findComment-340675 Share on other sites More sharing options...
wildteen88 Posted September 3, 2007 Share Posted September 3, 2007 Give your navigation links a class name instead. That way you can style them separately from your page links. Link to comment https://forums.phpfreaks.com/topic/67778-solved-exclude-element/#findComment-340707 Share on other sites More sharing options...
isaac_cm Posted September 3, 2007 Author Share Posted September 3, 2007 thanks Link to comment https://forums.phpfreaks.com/topic/67778-solved-exclude-element/#findComment-340768 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.