Power Coder
KPCKevin Powell - Community
•Created by Power Coder on 6/5/2024 in #front-end
Mix of elements in block level elements
This is from the section of the course “Inline formatting context & anonymous boxes” from the module “Unknown Fundamentals: formatting context”.
“When we have a block level element, it can either contain other block level elements, or inline elements. It cannot contain a mix of them”.
But from what I have been learning, it appears a block level element, (such as a div), can contain both other block level elements & inline elements simultaneously. Is anyone here familiar with this?
17 replies
KPCKevin Powell - Community
•Created by Power Coder on 5/30/2024 in #front-end
“collapsing margins in action” section
In the “collapsing margins in action”
of CSS Demystified, Kevin adds a padding top & a padding bottom & that brings the hero image into view where prior to that, it was partially covered.
I think I am somehow not understanding where the part is that explains why the lack of padding prevents the image from being in full view.
Can someone please explain how this works?
Thanks!
3 replies
KPCKevin Powell - Community
•Created by Power Coder on 5/29/2024 in #front-end
split border on inline element
6 replies
KPCKevin Powell - Community
•Created by Power Coder on 5/15/2024 in #front-end
collapsing margins
Hi! So I am on the “collapsing margins in action” part of CSS Demystified & am a little confused. Is the reason Kevin is saying the margins from the hero & hero_content are combining because the browser is adding a default padding-top to the hero section even though Kevin didn’t explicitly add one to it?
1 replies