You are here: Re: Someone help a CSS newbie: why is there extra bottom padding on image? « HTML « IT news, forums, messages
Re: Someone help a CSS newbie: why is there extra bottom padding on image?

Posted by steve on 07/05/07 08:10

"Ben C" <spamspam@spam.eggs> wrote in message
news:slrnf8no28.6fr.spamspam@bowser.marioworld...
> On 2007-07-04, steve <steve@nospamtoday.thanks> wrote:
>> Hi,
>>
>> I've got a simple problem - I'm trying to position a logo in CSS with a
>> 1px
>> border that has a padding of 1px, and a 1px margin. In IE6 it works fine,
>> but in Opera 9 or Firefox 2 the bottom border seems to have some extra
>> padding applied. The problem only occurs if the DOCTYPE declaration is in
>> place, without one everything is fine.
>
> Add div#logo img { display: block; }
>
> The gap is because the img is inline, and so sits on the baseline, with
> a gap underneath for descenders in the current font. But not in quirks
> mode. But don't use quirks mode, instead make the img a block.

Ahhh thanks... I knew little things like this would trip me up!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация