CrankBerry Blog Title
2009


No Comments

How to left align text in WordPress post

Here I am working in WordPress and posting articles and little did I know articles were being posted justified aligned. This would make sense as blogs tend to have the newspaper/article written feel (sometimes). I did not like this at all as since grade 7 I started liking my writing to be left aligned. So if you're reading this you may have already noticed that the posting is in a left align format. I'll Show you how.

In WordPress the headings and the entry has a mind of its own so you'll have to modify multiple codes to achieve what you may be looking for. First of all open up your style.css. New to programming? New to WordPress? New to the Internet? Thats ok, the style.css file is located in wp-content/themes/default/styles.css. If you aren't using the default theme then go into the folder that has your theme. In this case though I'm not sure if the theme comes with a different CSS style. So heads up, I'm actually working in the default Kubrick theme here.

Search for the following:

.widecolumn .entry p {
        font-size: 1.05em;
}

Simply just add text-align: left; inside. In my case I've added some margin as well so mine looks like:

.widecolumn .entry p {
        font-size: 1.05em;
        margin-bottom: 10px;
        text-align: left;
}

For the headings you'll have to add that in here:

h1, h2, h3 {
        font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
        font-weight: bold;
}

Just add the same text-align: left; anywhere inside the squiggly bracket things.

h1, h2, h3 {
        font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
        font-weight: bold;
        text-align: left;
}
TL
This entry was posted on Monday, September 21st, 2009 at 9:02 pm and is filed under WordPress. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
BL

Leave a Reply

Spam protection by WP Captcha-Free