Forum Moderators: not2easy

Message Too Old, No Replies

Img Hover not working in FF & Safari

         

mffishdog

2:44 pm on Jun 6, 2008 (gmt 0)

10+ Year Member



I've got an link hover attribute on some images that is supposed to change the border color from white to gray. It's working in IE, but in FF the border doesn't wrap around the image—it compressed to the bottom 20 pixels of the image.

I've exhausted my limited knowledge and would love some insight into what I'm missing when reviewing the code.

Here's the link: <>

Much obliged, y'all.


<style type="text/css" media="screen">
#Thumbs img {
border:none;
margin:5px;
height:300px;
width:100px;
background: #fcf;
}
#Thumbs a {
padding: 5px;
background-color:#FFFFFF;
}
#Thumbs a:hover {
padding: 5px;
background-color:#CCCCCC;
}
</style>
</head>
<body>
<div id="Thumbs" style="padding:5px;">
<a href="img.jpg" title="#"><img src="img.jpg"></a><a href="img.jpg" title="#"><img src="img.jpg"></a><a href="img.jpg" title="#"><img src="img.jpg"></a><a href="img.jpg" title="#"><img src="img.jpg"></a>
</div>

[edited by: SuzyUK at 5:00 pm (utc) on June 6, 2008]
[edit reason] no links see pinned posts thanks, code added [/edit]

Handlebar

4:38 pm on Jun 6, 2008 (gmt 0)

10+ Year Member



Try setting a height on your #Thumbs div. You did on #Thumbs img but not the container itself.

I believe that will do it.

mffishdog

5:27 pm on Jun 6, 2008 (gmt 0)

10+ Year Member



hmmm. tried that and it didn't work. even tried adding height to the anchor tag, hehe. nada nunca.

topr8

5:33 pm on Jun 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



how about setting

#Thumbs a:hover img{padding: 5px; background-color:#CCCCCC;}