sunaryolim Posted July 29, 2012 Share Posted July 29, 2012 Hai all , Can this condition create in CSS <div id="this1"> <a href="this2">link</a></div> #this1{ width: 100px; height: 100px; border: 1px solid #000;}#this2{ color: blue; text-decoration: none;} What i like to ask is : Could it i make #this2:hover but i will affect to the #this1 example when i hover the #this2(link) then i would like to #this1 border become (Border: 3px dashed #999) . Link to comment Share on other sites More sharing options...
Ingolme Posted July 29, 2012 Share Posted July 29, 2012 No, but if you put the :hover pseudo-class on #this1 you'll be able to style both #this1 and #this2. #this1:hover { border: 1px solid red;}#this1:hover #this2 { color: red;} Alternatively, you can just forget the <div> altogether and use "display: block" to make the <a> behave like a block. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now