Nikolaos Giannopoulos wrote:
The question is: Is there a single rule that could elminate this
background effect for all links that contain images? i.e.
Thanks to all for their feedback. I'll respond to everyone here and
include online test cases "when hover over the solmar logo":
http://solmar.ca/temp5/test0.html
Suggestion: The default do nothing explicitly case
+ Moz 1.3 - faint blue border appears underneath logo
+ IE6 - footer jumps about the size of the logo height (bizarre)
+ IE5 - no problems appear
Suggestion: The one that I presented (found on the net)
http://solmar.ca/temp5/test1.html
+ Moz 1.3, IE6, IE5 - no problems appear
Great except I was looking for a simpler rule <<
Suggestion: from Henri and Brian - use display: block
NOTE: Brian explicitly stated that this does not work with non-floated
elements but since Henri's link didn't explicitly talk about non-floated
elements I decided to test it out anyways.
http://solmar.ca/temp5/test2.html
+ Moz 1.3, IE6, IE5 - faint blue box appears to the far right of logo
between software box and right hand column - may need to widen browser
window to see it. Interestingly enough although this did help in the
vertical sizing of the logo as the link explains it produced an ugly
side effect as well.
Suggestion: Els' first suggestion
http://solmar.ca/temp5/test3.html
+ *Same* results as default case - and as one might guess since the img
would be what would be styled on the hover not the anchor itself which
is responsible for the faint background effect.
Suggestion: Els' second suggestion
http://solmar.ca/temp5/test4.html
+ *Same* results as default case - same as test3.
So far the only thing that works reliably is setting the background of
the anchor on hover to transparent for each case that arises. The
block:display may work for floated elements (I'm not sure and I didn't
bother testing this case).
If anyone has any other ideas I can quickly try them.... ;-)
Thanks again,
--Nikolaos
PS all browser versions tested above on win boxes.