Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Does no one use display: block and inline-block?

This might be a weird question but on youtube in guides I always see people using flex and grid.

I’ve started learning them but prior to that I was using block and inline-block exclusively.

So do people use flex and grid only?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

And also is flex different from flexbox because vs code displays them as 2 different options.

>Solution :

Well, I generally use display: block when a element with display: none has to be made visible.

Also, paragraphs and spans are inline elements. I find it quite difficult to work with inline elements, so whenever I style them, I generally make them block elements (may be not if they are children of a grid).

But in case of containers, yes I normally use display: grid. And they are generally have default display value of block, so why change it to block again?

As far as flex and flexbox go, I don’t know much about flexbox. But as far as I know, flex is the improved version of display: box and display: flexbox.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading