FORUMS: list search recent posts

change box color on hover

COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
hariprakash hadial
change box color on hover
on Feb 25, 2010 at 12:33:38 am


Hi

How can we change box color on hover like yahoo.com

http://www.yahoo.com/

see in Today news. box color will change on hover.

any idea??

thank you


Return to posts index

Ashwani Sharma
Re: change box color on hover
on Feb 25, 2010 at 10:15:14 am

Just 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


Return to posts index



Jameson Wallace
Re: change box color on hover
on Feb 26, 2010 at 4:57:38 pm

the 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
| http://MGFest.com


Return to posts index

hariprakash hadial
Re: change box color on hover
on Feb 26, 2010 at 8:43:19 pm

Thanks 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


Return to posts index

hariprakash hadial
this is funny
on Feb 26, 2010 at 10:00:51 pm

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



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]