It basically just comes down to "the largest margin wins." If you want "spacing" for the child and parent to behave separately, then you might want to use padding instead.
On rule 3: How can two block-level elements be on the same line, next to each other, to have margin-right and margin-left situation? Am I missing something?
This GUY and His Channel Should be Subscribed
Out of all the videos on Margin Collapse that I've seen as I'm learning this is the best one, short and exlains it very well visually.
Other videos just weren't doing it for me. Yours did. Thanks a lot!
Glad I could help!
tanks for this detailed and good explanation...its illustrated explanation really helps me
It was amazing, I struggled with understanding it and you made it easy. Thanks
Glad I could help!
This video is amazing for multiple reasons.
Thank you!
Thanks for this video! I thought there was some css in the project I was in that made this phenomenon. Turns out I just didn't know about this!
You're very welcome! Margin collapse is a weird one. 😅
That was fun to watch 😂 Thank you
Glad you enjoyed it!
I loved the creativity and all Infos in this Video .....Perfect....you are not only Smart but Creative also
Thank you so much 😀
I don't understand what he says because he talking in English and i am from bangal
Awesome tutorial...and lec delivery was really cool⚡
Thank you! Glad you liked it. 😊
amazing video! thank you!
Ugh.. this explains the problems I've been experiencing. Thank you
Just apply -> display: flow-root; on the parent container. This should fix it.
Nice! I've actually never used this before. Probably bc I would use flex/grid.
I don't understand why a top margin transfers to the parent element when applied to a child container
It basically just comes down to "the largest margin wins." If you want "spacing" for the child and parent to behave separately, then you might want to use padding instead.
it also won't happen when you have border property on parent.
On rule 3: How can two block-level elements be on the same line, next to each other, to have margin-right and margin-left situation? Am I missing something?
I’m not sure I understand your question exactly, but it doesn’t matter how many elements there are.
@@Skillthrive Sorry. I edited typos in my question. Thank you.
thx
Im an 11 year old and i learned html and css in 1 month and also half of javascript
my parents r not impressed with my newfound margin knowledge :(
Give it time!
Kinda sound like the Joe Rogan of web dev lol
We're related.