On Mar 2, 2006, at 6:41 AM, Alisha wrote: > I don't know how to clearly explain this, i think the example will > explain it better. Anyway, this happens on firefox and the part of the > css which mess it i think is this one
And happens on other browsers as well... > [...] > > The pages where it happens can be seen on > http://www.synthetic-effulgence.com/art/index.php to see an example of > what happen when I hover a link that is an image and on > http://www.synthetic-effulgence.com/links/index.php to see what it's > like a link with text on it. > Now the css above was thought to give the effect that it's right to > appear and that actually appear on the text, but on the a:hover img i > re-set the padding to 0 because when I took the padding off from > a:hover > it displayed the right way on the img, just with a border, but then > again if I did so the padding wouldn.'t have shown on the text either. > Point is, even if on a:hover img I set the padding on 0, it doens't > really work. and I can't understand why, and i can't think of a > workaround to get the text links like they show now, but the img links > just with a border,without that horrible square beneath them > It is not working the way you expect it to work. The image is wrapped in a <a> tag, basic syntax is <a><img /></a>. What your css does is adding padding on hover to the block created by the <a> tag. It is *not* adding any padding to the image block. > a:hover { > border:1px solid #094a98; > color:#094a98; > background: #b2d1f6; > padding:0.2em; > > } Now, this: > a:hover img { > border:1px solid #7eb9ff; > padding: 0; > height: auto; > width:auto; only controls the padding on the image, but doesn't affect the padding on the <a> in any way. The selector a:hover img translates as an <img /> that is child of a <a>. It does not translates as 'when the <a> contains an <img>', do something. That is not the way css works. Philippe --- Philippe Wittenbergh <http://emps.l-c-n.com> ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/