Topic: weird gap in css positioned page |
|
---|---|
Author | Thread |
Paranoid (IV) Mad Scientist From: Houston, TX, USA |
![]() ![]() ![]() ![]() ok, i've gone way out of my comfort zone, ditched the tables completely and coded a site in css |
Maniac (V) Inmate From: under the bed |
![]() ![]() ![]() ![]() http://www.in-dented.com/temp/fig/exit%2026.htm |
Bipolar (III) Inmate From: Umeå, Sweden |
![]() ![]() ![]() ![]() Fig: You have encountered the phenomenon called margin collapsing. Essentially, any two margins that touch are merged into a single margin. The margin-top of the #bodyblock>#cont>p element touches that of the #bodyblock element, thus they merge. A 1px padding-top on #cont should fix this. |
Maniac (V) Inmate From: under the bed |
![]() ![]() ![]() ![]() Either I misunderstand margin-collapsing, or that is incorrect. |
Paranoid (IV) Mad Scientist From: Houston, TX, USA |
![]() ![]() ![]() ![]() outstanding, thanks for the help DL. i found an online reference that had some sample layouts and tweaked one of those to get the positioning so that's probably where the "align" references came from. |
Bipolar (III) Inmate From: Umeå, Sweden |
![]() ![]() ![]() ![]() DL-44: No, the CSS specification is quite clear on that issue: quote:
|
Maniac (V) Inmate From: under the bed |
![]() ![]() ![]() ![]() |
Bipolar (III) Inmate From: Umeå, Sweden |
![]() ![]() ![]() ![]() Hmm, a padding on #cont should have done it. Might be that moz gets that wrong though. Specifically changing the margin-top to a padding-top for that p element will work, at least. |
Maniac (V) Inmate From: under the bed |
![]() ![]() ![]() ![]() |
Bipolar (III) Inmate From: Umeå, Sweden |
![]() ![]() ![]() ![]() Well, I was still talking about Fig's original code... |