View Single Post
Old 06-27-2008, 01:19 PM   #5 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

The way maZtah wrote that, the snippet would only affect images inside of an A-nchor tag. <a href...>

Code:
a img { #images inside A  <a href...><img></a>}
img { #all images <img>}
img.imgClass { #any images with the class 'imgClass' <img class="imgClass" ...> }
div#menu img { #only images located inside a div with the id of 'menu' <div id="menu"><img></div>}
See how that works?

If the image is already a link you shouldn't have any problem implementing maZtah's fix. I would also suggest using straight CSS to do this instead of javascript, especially in this case it's highly unnecessary and redundant considering css already allows you to add the :hover pseudo selector.

If the code above was exactly how it was going to be used, this is how I'd write the same fix (without the javascript);

Code:
td.bgrolloverPlain img
{
    border : 3px double #FFF;
}

td.bgrolloverPlain img:hover
{
    border: 3px double #000;
}
delayedinsanity is offline  
Reply With Quote