Click to See Complete Forum and Search --> : Firefox - Overflow Hidden Fix


benracer
09-15-2008, 01:38 PM
Hello,
I have my layout sorted and it works fine in most browsers including ie.

In firefox a gap of around 30px appears between my content and static div.

If i set my content div to hide overflow the gap is removed allthogh this method ends up hiding my image footers that are positioned relative top 5px.

How can i remove the gap without cutting off half of my images in the content div?

Thanks...

http://v2.btronics.co.uk/static/hemel.php

(View In Firefox) =)

NogDog
09-15-2008, 02:20 PM
Try setting the top/bottom padding value of the applicable containing element(s) to a non-zero value (1px should be enough). There's a bug/feature that causes a container with a zero padding value to treat any margin of an element within it to extend past the container and act as that container's margin, but giving the container a non-zero padding value seems to stop that bug/feature.

benracer
09-15-2008, 02:25 PM
Thanks thats worked - Allthough it doesnt look as should with a 1px gap in each column. Is there any way to compensate for this?

Is it possible without using position relative top 1px?

madwormer2
09-15-2008, 09:37 PM
Using a negative top margin will shift the element upwards.

NogDog
09-15-2008, 11:15 PM
The alternative to adding the padding in the containing element is to make sure that the element contained within it has a margin of zero where the unwanted space is.

benracer
09-16-2008, 12:11 PM
Using a negative margin does not seem to work.

Nogdog could you please explain futher or give me an example as im unsure on what you are suggesting =)