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]

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;
}

Archived

This topic is now archived and is closed to further replies.

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