Posts

Showing posts from December 10, 2018

Why is inline styling OK with bootstrap?

Image
up vote 2 down vote favorite I am doing an online course on frontend, I have just started getting to know bootstrap 4 and flexbox. As far as I understand, to do inline styling is something that is considered bad practice. What I mean is this: <button style="color: white; border: 5px solid red;"> Press me! </button> And I like that the good practice is to not do this, mainly because of readability. What I don't understand is why the button above is not a good practice but the code here is considered good practice <button class="btn btn-primary btn-lg d-flex justify-content-center> Press me! </button> Just to clarify I do understand that the style that I used in the example doesn't do the same thing as the one using bootstrap. I am just interested in why one is OK and the other ...