You are here: Re: Space after div « HTML « IT news, forums, messages
Re: Space after div

Posted by TC on 07/29/06 14:39

Els wrote:
> TC wrote:
>
> > Els wrote:
> >> TC wrote:
> >>
> >>> Chris wrote:
> >>>> I am trying to create a footer effect beneath a div. The main div puts a
> >>>> space before it shows the footer div, is there any way around this. I have
> >>>> posted a link.
> >>>
> >>> Here's a tip that I've found useful. Temporarily assign different
> >>> background colors to some or all of the elements in your HTML
> >>> (snip) Then you can easily see where the unexpected space is
> >>> coming from.
> >>
> >> Although it's sound advice, it only partly helps in this case, since
> >> the space remains white :-)
> >
> > What I normally do in that case, is to keep adding background colors to
> > higher-level elements until I hit the right one. In this case, perhaps
> > the BODY element? (I don't know, I haven't tested it)
>
> The problem is that this is about the only problem where background
> colours fail to show what's wrong.
> The collapsing margins are just that: margins. Margins don't have
> background colours. If you would give the direct parent a
> background-color, say blue, then you would see the blue right below
> the red of the div, which is covered by the green of the contained p.
> Unless you know about the collapsing margin, it's difficult to guess
> that you should be seeing red below the green, instead of blue.

Ok, got it :-)

TC (MVP MSAccess)
http://tc2.atspace.com

 

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

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