CSS: Align Left – Make text or image aligned left with CSS

by Yang Yang on March 2, 2009

Share This Article:
Subscribe to Kavoir: blog feed

Believe it or not, though this is rather basic in CSS, someone just poked on Gtalk to ask how he could align a paragraph left in HTML as he could in Word.

Here goes a quick post for the solution:

p {text-align:left;} /* a generic styling rule for all p tags to align inner text left */

Just change ‘p’ to whatever selector you need.

There you go, CSS text-align is the rule to go! Other than that, you can also align text right by text-align:right or center by text-align:center.

Want to know how to right align or center align things in CSS?

Share This Article:
Subscribe to Kavoir: blog feed

You should also read:

Previous post:

Next post: