pls help:)
how to change the color of this image to brown on hover using css.
@ganeshie8 @e.mccormick
@Preetha
@annas
<style type="text\css"> #element_id:hover{ color=SaddleBrown; } </style> I used SaddleBrown instead of normal brown because on my screen normal brown looks more red. here's a list of the named colors and what they look like. You can also use hex values or RGB() or RGBA() to set color and transparency w3schools.com can explain all of that for you if you're interested
where should i call this? in the image tag?
@seandisanti
While you can do it inline, within the tag, convention and best practices say that it should be done separately in a style tag as demonstrated, or completely off page in a linked css file. Also keep in mind, while the posted sample will change the color property of the element with the id specified, images are images, the color property may not do what you think it will. check out http://www.w3schools.com/cssref/default.asp for a list of properties and their acceptable values.
thanx. isn't there anyway for me to change the color.
i mean any other way. xos i tried so many methods. bt nothing seem to work fine
typically 'color' refers to foreground color, or text. you also have background color etc, but your image is going to be covering the background so that doesn't work really well either. What I typically do would be to put the image on a colored div of the same size, and then on hover adjust the opacity and border of the image. having it turn slightly transparent gives the illusion of the color behind it being added. Here is a mock up page I did for a friend that does the opposite, by starting with a lowered opacity image, and then setting the opacity to full http://seandisanti.com/ctm/index.php
Thnx a lot.:)
no problem, i'm glad to help
Join our real-time social learning platform and learn together with your friends!