zombie [iNH] wrote:
> The URL is: http://bross.hr/test2/alp/
> (try to open it in IE and FF and see the difference)
>
> Ok, so I have a main DIV and inside some DIVs, using background
> pictures for graphics which should be perfectly aligned. I have put
> margin and padding 0. If the div is empty, it stays aligned, but if I
> put some text in, it develops a margin? So the background is not
> aligned any more. :/ In IE 5 & 6 it looks ok. If I put another DIV
> aorund the content with padding:1px it looks better, FF & IE6 render
> the same, but IE5 just ignores it :/
Don't have time to debug, but I hink it is the usual suspect: Collapsing
margins[1]...
A 'padding-top: 1px' on the div-container with paragraph(s) in it should
do the trick if that's the case, as it is the margin on the paragraph
that creates the gap between the divs. Setting the top margin on the
paragraph to zero will of course also work, but that's not always what
we want for the rest of a page.
The reason IE/win doesn't play ball - look ok - is probably because it
has its 'hasLayout'[2] bug/feature triggered by a dimension on the div.
regards
Georg
[1]http://www.w3.org/TR/CSS21/box.html#collapsing-margins
[2]http://www.satzansatz.de/cssd/onhavinglayout.html
--
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/