Take a look at this please
It looks fine in all browsers except IE7 (and maybe IE6, but I don’t have that one installed right now). IE8 is fine.
“Fine” means: the image and the text below form one white rectangle, without any black line between them.
In IE7, there is a ‘ghost’ top margin on the first p in the “comment” class div. I checked it out with Firebug lite, and it gives all the correct values, but it also shows that this black line is part of the first p. Since the p has a white background, and no padding or margins, it should be all white (like it is in all other browsers).
If I use float:left instead of position:relative on the “comment” div, that black line disappears, but the box doesn’t expand to the width of the image anymore.
Any solution? :injured:
By the way, the original page contains a lot more data, so don’t wonder why I have all those empty divs inside empty divs
.comment doesn’t have Layout. When you float: left, you’re giving the box Layout.
Solution: either a hidden “zoom: 1” comment somewhere, or trigger out in the open by giving .comment a width.
Note: why two separate p’s for a single sentence?
Request Parts.
By email.
I would do the caption like this and avoid the problem.
<ul>
<li><a href="#"><img src="http://www.galleons.it/sptest/images/wp491fe4cd_0f.jpg" alt="Request for parts by email" /></a><[B]span>Request Parts<br>By email</span><[/B]/li>
</ul>
I didn’t notice that you had floated the anchor and put a margin on it so the span needs to be inside the anchor which would make more sense anyway as the text and image become one link which is good.
<ul>
<li><a href="#"><img src="http://www.galleons.it/sptest/images/wp491fe4cd_0f.jpg" alt="Request for parts by email" /><span>Request Parts<br>
By email</span></a></li>
</ul>
If you don’t want the text to be an image then you would need to float the list and remove the margin from the anchor and apply it to the list.
Edit:
Hmm… Ie6 and 8 are now ok but IE7 is wrong - Give me a minute to look
Thanks a lot guys! I’ll have to study a bit to understand it all.
One last question: I noticed this before, and it is happening again with this solution: in IE7 the span inside the <a> tag makes the mouse cursor loose its hand shape, although the span is part of the link and clickable. Any idea why?