Afficher un message
Vieux 30/03/2008, 20h12   #3
Gus Richter
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Img - bottom margin mystery

Ben C wrote:
> On 2008-03-30, John Dann <news@prodata.co.uk> wrote:
>> Don't know whether anyone might be willing to take a look at a little
>> CSS problem that's stumping me. There's a page fragment at:
>>
>> http://www.weatherstations.co.uk/default_test.htm
>>
>> and the item giving the problem is the clouds image (which has
>> deliberately been duplicated as a further check.)
>>
>> The question is why there seems to be a bottom margin of white space
>> to the clouds image (in IE7 and FF2.0.12 at least) when AFAICS all
>> the relevant margins, padding etc are set to zero in the stylesheet.
>>
>> I'd like to try to understand what's generating this specific problem
>> if anyone can offer an explanation please.

>
> It's because imgs are display: inline, so they sit on the baseline like
> text, with a bit of space below them for descenders.
>
> Make the img display: block.


Or make the img vertical-align:bottom;

--
Gus
  Réponse avec citation
 
Page generated in 0,05330 seconds with 9 queries