Reply to Re: Space after div

Your name:

Reply:


Posted by Beauregard T. Shagnasty on 07/29/06 13:38

Els wrote:

> Beauregard T. Shagnasty wrote:
>
>> Chris wrote:
>>
>>> It's probably not what you meant but I added an emtpy paragraph at
>>> the bottom with its margin set to 0 and its working. It didn't seem
>>> to work on the margin.
>>
>> Not a good idea. Some browsers may completely collapse an empty
>> element, thus giving you no benefit. Add the padding to the last
>> real paragraph as already stated.
>>
>> #maincenter p {padding: 2em; }
>
> Wasn't stated by me though ;-)
> My suggestion was #maincenter {padding-bottom:1px;}

Unfortunately, "#maincenter" has the following inline style:
<div id="maincenter" style="padding:0px;margin:0px;" class="test">
so adding your padding-bottom would be overridden. 'Tis why I added the
p to it. ;-)

> The padding on the paragraph will not stop the margin of it collapsing
> with the 0 margin of the div around it, which is causing the space.

I thought we were trying to add some space ... the test page sure could
use a bit.

--
-bts
-Warning: I brake for lawn deer

[Back to original 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

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