Brought to you by
2BlueSolutions Creative Web Design

Sunday, February 20, 2011

Placing Code In Your Blogspot Post

Ever wanted to post code to your Blogspot account, but ran into a mess regarding how Blogspot interprets your code sample?  Well, the solution is pretty straightforward with a bit of tinkering.

First, you'll need to edit the HTML of your blog from the Design, Edit HTML tab in the administrative section of your Blogspot account.

What you will need to do is add a class to the style section in the header called .postCode which will look something like this:


.postCode{
 background:#FCFCFC none repeat scroll 0 0;
 border:1px inset #012BB2;
 height:150px;
 margin:10px;
 overflow:auto;
 padding:6px;
 text-align:left;
}

Then, whenever you right a new blog post, you need to make sure to select the Edit HTML tab next to the Compose button and put the following wrappers around the code:

<pre class="postCode"></pre>

Now, to actually get it to appear like that, you have to put your code through a bit of a translation by using this link to a Text -> HTML Entities page.

Basically, you paste the code you want to display into one box, then it converts it to what you need to paste between the above postCode wrapper.

Wednesday, February 2, 2011

Quick update

I've been spending the last month working on the completion of an overall brand change on my website and blogs.  The new site was supposed to be live in January, but it looks like it has been pushed off until the end of February.

I've moved on to a lot of JQuery usage and will be detailing a lot of the tips and tricks that I have found so far.  Of course, I have still been dabbling in Joomla and I am always available to answer any questions people may have.