The Rules of Margin Collapse
joshwcomeau.com
The Rules of Margin Collapse
1–10 of 35 posts
Re: The Rules of Margin Collapse
#2Re: The Rules of Margin Collapse
#3Re: The Rules of Margin Collapse
#4"Damn it collapsed. Okay padding then"
Re: The Rules of Margin Collapse
#5You see, what happens is that capitalism rewards the greater risktakers and when the success stories have survivor bias you end up with — oh we’re talking about CSS? Sorry, nevermind.
Re: The Rules of Margin Collapse
#6I've been in finance too long, my first thought was this is about margin calls on short positions.
Re: The Rules of Margin Collapse
#7I've been in finance too long, my first thought was this is about margin calls on short positions.
Re: The Rules of Margin Collapse
#8One of those things I've just been subconsciously dealing with for years without ever deciding to actually learn the rules. "Damn it collapsed. Okay padding then"
Re: The Rules of Margin Collapse
#9One of those things I've just been subconsciously dealing with for years without ever deciding to actually learn the rules. "Damn it collapsed. Okay padding then"
Just don't use margins for layout, I guess.
Re: The Rules of Margin Collapse
#10One of those things I've just been subconsciously dealing with for years without ever deciding to actually learn the rules. "Damn it collapsed. Okay padding then"
The behavior is very obvious if you use them for text. (I have had a few cases of naively stating my margins, the browser exactly displaying what I meant, instead of what I thought I have said, and needing to understand why it worked.) Just don't use margins for layout, I guess.