DEV Community

loading...

Discussion on: Never make your text container a flexbox container

Collapse
nikolab profile image
Nikola Betica • Edited

Actually, nothing wrong with flex here. Your block of text should be wrapped in p tag.

Collapse
afif profile image
Temani Afif Author

not everyone will do this and even in such case many developer may apply the flexbox properties to the p element.

Collapse
nikolab profile image
Nikola Betica

I know, just offering a correct solution :)

Collapse
qm3ster profile image
Mihail Malo

It was wrapped in a <p> tag. The problem is they made the p tag itself display: flex.

Thread Thread
afif profile image
Temani Afif Author

@qm3ster the initial code was using a div and I changed it to p but it doens't make a difference the type of the container. The main issue is the same and we should not have display:flex on text conainer.

Some comments have been hidden by the post's author - find out more