Topic: weird gap in css positioned page (Page 1 of 1) |
|
---|---|
Paranoid (IV) Mad Scientist From: Houston, TX, USA |
posted 11-17-2004 00:08
ok, i've gone way out of my comfort zone, ditched the tables completely and coded a site in css problem is i have this odd gap in the center of my layout and i can't figure out why. |
Maniac (V) Inmate From: under the bed |
posted 11-17-2004 01:26
http://www.in-dented.com/temp/fig/exit%2026.htm |
Bipolar (III) Inmate From: Umeå, Sweden |
posted 11-17-2004 02:10
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 |
posted 11-17-2004 02:14
Either I misunderstand margin-collapsing, or that is incorrect. |
Paranoid (IV) Mad Scientist From: Houston, TX, USA |
posted 11-17-2004 07:58
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 |
posted 11-17-2004 10:36
DL-44: No, the CSS specification is quite clear on that issue: quote:
|
Maniac (V) Inmate From: under the bed |
posted 11-17-2004 14:03 |
Bipolar (III) Inmate From: Umeå, Sweden |
posted 11-17-2004 16:13
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 |
posted 11-17-2004 18:41 |
Bipolar (III) Inmate From: Umeå, Sweden |
posted 11-17-2004 20:56
Well, I was still talking about Fig's original code... |