[Solved] P element doesn’t work as a ‘div’ element?


Add !important to your class to force your selector to work. That is,

.alignCenter{text-align: center !important;}

See this Fiddle.

See Stack Overflow question What is the difference between <p> and <div>? to view the difference between p and div.

solved P element doesn’t work as a ‘div’ element?