Search blog.co.uk

How to cure Blogthings code...

by ajnspencer @ 06/05/07 - 09:54:02

We've all seen the memes from Blogthings and we've all seen the various comments saying "the damn code didn't work".

So here it is, the one step trick to fixing most blogthings code...

Commas.

Yep, that's all it needs, you see HTML uses commas to mark out settings, those commas aren't in the blogthings code so it goes floopy (technical term)

So, all you need to do is make your code look like this (with the triangle brackets kept in place replacing the [] I've put in to mark the spots...)

[table width='350' align='center' border='0' cellspacing='0' cellpadding='2'][tr][td bgcolor="#96D6C5" align='center']

See, like Superman taking out an ad in the Daily Planet telling everyone he's killed by Kryptonite there is my biggest code fixing trick, commas!

If you ever do a blogthings remember this post and pass it on! (and not just to get me hits ;))

Formatting shortcuts

by ajnspencer @ 16/06/06 - 07:15:46

There are a couple shortcuts to the most used text formatting options.

A double asterisk before and after a word replaces the 'strong' command.

so * *strong text* * when the spaces are removed becomes strong text.

Also a pair of \ marks either side create italicised:

\ \italic text\ \ without the spaces becomes italic text.

Linking

by ajnspencer @ 06/03/06 - 22:44:42

Following on from the last post, another quickie simple one, how to link text etc.

Simple wrap whatever you want to link from inside:

[a href="SITE"] [/a]

Linking from images

by ajnspencer @ 03/03/06 - 22:20:34

Nice simple one this...

Added a photo earlier and wanted the photo to link to a website instead of to the blog media page.

It's very easy and only needs one change in code, it should even work with images you're importing from another site as well rather than uploading.

When you upload it it gives you this as the begining of the code:

a href='http://www.blog.co.uk/srv/media/media_item.php?item_ID=397422'

So all I did was replace the link with the one from the site I wanted the image to link to...

a href='http://www.hammacher.com/publish/72824.asp'

TA-DA!!!! :>>

Table colouring

by ajnspencer @ 01/03/06 - 22:49:49

Inspired by Mr G here's a little look at making multicoloured tables.

If you're new it might be an idea to read the previous posts, when you hear THIS noise *BING* it's time to turn the page.

Here we look at how to make this...

Top Left Top Right
Bottom Left Bottom Right

You KNOW you want to... Now, heres the code we used for the previous table with []s replacing the triangle brackets:

[table width="200" border="1" align="center" cellpadding="3" cellspacing="3" bgcolor="#cccccc"]
[tr]
[td]top left[/td]
[td]top right[/td]
[/tr]
[tr]
[td]bottom left[/td]
[td]bottom right[/td]
[/tr]
[/table]

To colour a row or individual cells we only need to add one thing, the colour in one of two places.

To colour an entire row add it after the tr:

[tr bgcolor="#0000FF"]
[td]top left[/td]
[td]top right[/td]
[/tr]

To colour an individual cell, place the code in the td area:

[tr]
[td bgcolor="#0000FF"]top left[/td]
[td]top right[/td]
[/tr]

So the code for our multicoloured table is:

[table width="200" border="1" align="center" cellpadding="3" cellspacing="3" bgcolor="#cccccc"]
[tr]
[td bgcolor="#0000FF"]Top Left[/td]
[td bgcolor="#FF0000"]Top Right[/td]
[/tr]
[tr]
[td bgcolor="#FFFF00"]Bottom Left[/td]
[td bgcolor="#00FF00"]Bottom Right[/td]
[/tr]
[/table]

Gawd I hope that makes sense...

Text colouring

by ajnspencer @ 28/02/06 - 21:44:13

NOTE: Ths isn't for use in comments, just posts and header text.

Did you know it's possible to colour your text?

Yes it is!

Now, take a look at the post on text sizes because the coding is much the same.

[font size="3"][/font] gives a size three font.

[font size="3" color="#ff0000"][/font] gives a size three font in red.

See, here it is.

All colours need to be put in as hexidecimal, to help take a look at this excellent colour picking site.

A little personal note... Be a little careful with what you colour, red on green, yellow or purple on pink, all can clash and it's a proven fact that some colour combinations make it nigh on impossible for dyslexics or people with a visual impairment to read.

Tables - Aligning entries.

by ajnspencer @ 28/02/06 - 15:06:16

OK, I promise this is the final one for now to save ALL of us from going insane! (It's taxing my brain writing these, I'l tell ya!)

The text in each cell auto aligns to the eft hand side but you can align it to the centre or the right.

[tr]
[td]top left[/td]
[td]top right[/td]
[tr]

was the top half of the table from my prevoius posts, now lets fiddle the text by adding div code.

the way of writing this is to put [div align=left"/"center"/"right"] and [/div] codes before and after the text, with triangular brackets of course. (you're all gonna tell me where to stick my triangular brackets aren't you...)

So if we changed that chunk of the code to read...

[tr]
[td][div align="center"]top left[/div][/td]
[td][div align="right"]top right[/div][/td]
[tr]

We get:

top left
top right
bottom left bottom right

I've lost it haven't I...

Tables - Extras

by ajnspencer @ 28/02/06 - 14:50:49

There's some extra code you can put in for tables in the very first line.

[table border="1"] was our first line but here's some changes we can make, they're all put inside the triangular brackets and with spaces between.

Adding width="(number)" can size our table. In a standard table the cells expand and contract to fit the text, this means we can have a table sized how we want. Therefore having

[table border=1 width="200"]

makes the table:

top left top right
bottom left bottom right

we can align the table by adding in align="left"/"right"/"center"

So [table width="200" border="1" align="center"] becomes:

top left top right
bottom left bottom right

Other codes change the look of the table by:

  • cellpadding="1" - expands the size of the cell around the text.
  • cellspacing="1" - expands the gap between cells.
  • bgcolor="#cccccc" - changes the colour of the table.

Obviously the numbers and the colour can be changed for personal preference!

So, using:

[table width="200" border="1" align="center" cellpadding="3" cellspacing="3" bgcolor="#cccccc"]

gives us:

top left top right
bottom left bottom right

Now, hands up who's still awake and caring... :))

Tables - simple

by ajnspencer @ 28/02/06 - 14:21:31

OK, bit complicated this one so stick with me and I'm hoping I'll make some sense...

It's possible to use standard table codes in your blog to make something like this:

top left top right
bottom left bottom right

Now, here's the coding for this but with [] brackets replacing the needed triangle brackets.

[table border="1"]
[tr]
[td]top left[/td]
[td]top right[/td]
[/tr]
[tr]
[td]bottom left[/td]
[td]bottom right[/td]
[/tr]
[/table]

As you can see, the table starts and ends with (unsurprisingly) the 'table' code then tr gives a table row and td makes a table column.

To add a row simply use:

[tr]
[/tr] - again replacing the [] with triangular brackets.

Then, between those two add in as many [td][/td]s as you want columns in that row.

Border width can obviously be changed to suit your own preferences, I merely added a 1 border to show where the table was.

Lines

by ajnspencer @ 27/02/06 - 22:08:41

Here's another quicky

hr - surrounded by the triangular brackets of course, gives you:


It's a single code like the break, it only needs that one piece of code.

:: Next Page >>

Footer

The content of this website belongs to a private person, blog.co.uk is not responsible for the content of this website.