How does the CSS Block Formatting Context work

0 votes
How does the CSS Block Formatting Context work?

CSS2.1 specifications say that in a block formatting context, boxes are laid out vertically, starting at the top. This happens even if there are floated elements in the way, except if the block box established a new block formatting context. As we know, when browsers render block boxes in a block formatting context, the floated element is omitted, why does establishing a new block formatting context work?

How are boxes (block boxes and inline boxes) laid out in the normal flow?

I read somewhere that block elements generate block boxes, but floating elements are ignored when a user agent draws a box and take them into account when they fill out the content. Whilst floating elements will overlap other elements' boundaries of the boxes, the solution is establishing a new block formatting context for the overlapped elements using overflow: hidden.

"New block formatting context is still block formatting", so when drawing a box, it will also treat the floating element as if it doesn't exist. Is that right or have I misunderstood "new block formatting context?"
Jul 5, 2022 in CSS by Edureka
• 13,620 points
383 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In CSS

0 votes
1 answer
0 votes
1 answer

How to add new colors to tailwind-css and keep the original ones?

You can easily add new colors to Tailwind ...READ MORE

answered Jun 21, 2022 in CSS by Edureka
• 12,690 points
4,069 views
0 votes
0 answers

How do CSS triangles work?

There're plenty of different CSS shapes over ...READ MORE

Jul 4, 2022 in CSS by Edureka
• 13,620 points
429 views
0 votes
0 answers

How do negative margins in CSS work and why is (margin-top:-5 != margin-bottom:5)?

A common trick for vertical positioning elements ...READ MORE

Jul 18, 2022 in CSS by Edureka
• 13,620 points
895 views
0 votes
0 answers

How to adjust the amount of space between two lines at each <br> in CSS?

I have a document like this: This is ...READ MORE

Aug 23, 2022 in CSS by Edureka
• 13,620 points
767 views
0 votes
1 answer

How do I give text or an image a transparent background using CSS?

Use either a semi-transparent PNG or SVG ...READ MORE

answered May 27, 2022 in CSS by Edureka
• 12,690 points
613 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
10,540 views
0 votes
1 answer

Using/Handling colon inside a JSF generated HTML element ID in CSS selector

Yes, you can.  Just Backslash (\) the colon.  Like ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,250 points
2,846 views
0 votes
1 answer

What is a css selector and where is it used?

CSS Selector is a combination of element ...READ MORE

answered Nov 21, 2018 in Data Analytics by Kalgi
• 52,350 points
924 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP