Activity › Forums › Web Design (WordPress, Joomla, etc.) › change box color on hover
-
change box color on hover
Posted by Hariprakash Hadial on February 25, 2010 at 12:33 amHi
How can we change box color on hover like yahoo.com
see in Today news. box color will change on hover.
any idea??
thank you
Hariprakash Hadial replied 16 years, 2 months ago 4 Members · 5 Replies -
5 Replies
-
Ashwani Sharma
February 25, 2010 at 10:15 amJust make property of your div ‘display:block’ and onHover you can change any color of your box.
Thanks and Regards,
Ashwani Sharma
Sr. Web Designer -
Mike Smith
February 25, 2010 at 10:34 am -
Bishop Zareh
February 26, 2010 at 4:57 pmthe above posts answer the question appropriately, but thought I would add the jQuery solution for the more advanced readers.
$(‘#boxDivID’).mouseover(function() {
$(this).css({backgroundColor:’#123′,cursor:’pointer’});
});
| Jameson Wallace
| Motion Graphics Festival
| New Motion + New Sound + New Code
| https://MGFest.com -
Hariprakash Hadial
February 26, 2010 at 8:43 pmThanks to all of you…
here is what i did..
<style type=”text/css”
.box:hover {
background: red;
}and its working great for me…
Is it okay to write code like this..I have question for Mr.Ashwani..
can you please give an example of how to create onHover function
I really appreciate your help
thanks
-
Hariprakash Hadial
February 26, 2010 at 10:00 pmWell this is extremely funny….
In previous post i added some code to show you guys whether it is ok or not…
but now that code is embeded into page code and giving that on hover effect… just hover mouse over my last post and u will notice this effect……
Reply to this Discussion! Login or Sign Up