DEV Community

Cover image for The CSS Box Model(Flexbox)
Saqib Suleman
Saqib Suleman

Posted on

The CSS Box Model(Flexbox)

Understanding the box model of CSS makes positioning and aligning our content much easier. In our CSS box model, we understand that every element has its own box model, such as if we add a paragraph to our webpage, that paragraph has a blue-box first which is the content of the paragraph, then there is padding between the content and the border of the content, then comes the border of our paragraph and outside of that border is the margin that our content is keeping from other content. In this way, we can position our content, in this case a paragraph, relative to other content on the web page.

image

After learning the Flexbox, I made a small pricing table project which you can check on Github. Github link: github.com/saqibs3291/pricing-table

Top comments (0)