Jump to content

box around text which changes border color on hover.


seany123

Recommended Posts

i have recently seen on a site a link a website where the text is in a box and on hover the border on the box changes color, i dont think its an image as i have viewed source.

 

 

examples shown in image attached,

 

how can i replicate something similar?

 

[attachment deleted by admin]

Link to comment
Share on other sites

Can you please tell how to implemented it?

 

I want to do the same on my Affiliate site, where when u hover over the product image, border changes.

 

you require the pseudo hover class for that. (see: http://www.w3.org/TR/CSS2/selector.html#dynamic-pseudo-classes)

for instnace you have a <p class="yourhoverclass"> </p> with some text in it

 

in css you can than do.

p.yourhoverclass{
   padding:5px;
   border:1px solid blue;
}
p.yourhoverclass:hover{ /* adding a pseudo hover class  (:hover) */
   border: 1px solid red;
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.