Jump to content

How to Make like this condition

Recommended Posts

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 post
Share on other sites

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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...