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] 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. 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; } 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
Archived
This topic is now archived and is closed to further replies.