DEV Community

Discussion on: Reasons developers avoid CSS

Collapse
seanability profile image
Seanability

I stopped doing any regular front-end development about 15 years ago. Prototype.js was the only library around and we were just converting our table layouts to CSS. Fast-forward to recent years and I just can't seem to wrap my head around it. Even something that should be simple, e.g., centering a single React component on the screen with Bootstrap led me down many SO questions and answers, all complicated, none seeming to work as inteded. I eventually combined a few answers and got my component horizontally centered, and decided that was good enough. The fact that something trivial became complicated is what made me say, "nuts to this".

Collapse
darthknoppix profile image
Seth Corker Author

I'm sorry you had such a difficult time, I don't think CSS is especially straight forward in some cases and vertical centring is one of these cases. I would like to say that although this has been a notoriously difficult problem in CSS, once you understand the fundamentals of CSS - it's much easier.

Modern CSS makes the problem almost trivial if you use Flexbox or Grid positioning, if you've been away from the frontend for a while or even just want to brush up on flexbox - I recommend taking a look at (Flexbox Froggy)[flexboxfroggy.com/].