Bootstrap conventions

In Bootstrap, what is the reason for using “class:‘text-center’”? Adding “style=‘text-align:center’” seems to be more simple.

Isn’t it that the bootstrap class is inline, whereas text-align can be in the CSS file and hence be more easily refactored if necessary?

I guess it’s simpler (and more consistent) to just add a class than add a style attribute. Compare
<p class="lead text-center">
<p class="lead" style="text-align:center;">

1 Like

I’m satisfied with these answers thanks. Can I give points/cookies here as well as I can in the Chat?

Ha ! :grin: well your answer serves as reward, don’t worry - but for other posts that you like you can just click the little heart, the poster is notified every time.

1 Like