A CSS pseudoclass trouble
-
This a CSS question and i was wondering how to do this.
i have a h1 heading consisting of 3 words namely Barking, Dogs and Training. This is HTML code<header> <h1 class="container_12"><a href="#">Barking <span>Dogs</span> Training</a></h1> </header>
The effect i wanted was if a user hovers/ focuses/activates my link the middle word “Dogs” should change its color.
i tried thisheader h1 a:link, header h1 a:visited{ text-decoration: none; color: #e37d19; } header h1 a span:hover{ color: #1f8ea6; }
I guess you have seen the problem here. i want the color of the text enclosed within span tags to change irrespective of the hovering position on the h1 link(i mean when the user hovers over the any part of the heading).it changes color only when i hover over the middle word which is enclosed within span tags.
Can anyone please tell me how to do it?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘A CSS pseudoclass trouble’ is closed to new replies.