seany123 Posted May 19, 2011 Share Posted May 19, 2011 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] Quote Link to comment https://forums.phpfreaks.com/topic/236889-box-around-text-which-changes-border-color-on-hover/ Share on other sites More sharing options...
natasha_thomas Posted May 20, 2011 Share Posted May 20, 2011 Can you plz 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. Quote Link to comment https://forums.phpfreaks.com/topic/236889-box-around-text-which-changes-border-color-on-hover/#findComment-1218018 Share on other sites More sharing options...
cssfreakie Posted May 20, 2011 Share Posted May 20, 2011 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; } Quote Link to comment https://forums.phpfreaks.com/topic/236889-box-around-text-which-changes-border-color-on-hover/#findComment-1218070 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.