|
Posted by Els on 07/29/06 14:29
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.
--
Els http://locusmeus.com/
Navigation:
[Reply to this message]
|