CSS CSS Basics The Box Model Margins

Nick Ars
Nick Ars
5,341 Points

margin and align

I have the following question: when should we use margin or align if we want to move the text (content) to the right, left side or center?)

1 Answer

So margin shouldn't be used to move text. Its should really be text-align

Margin is used to give elements space on the outside of the box model. Padding gives space on the Inside where as text-align is there to allow for aligning text.

Personally I would never use margin for this