New Photos:

  New Ramblings:

  New Links:

Counter

Last Updated

 


Previous Posts





About the Blog

The thoughts and theories of a guy who basically should have gone to bed hours ago.

I know, I know - what's the point? But look at it this way - I stayed up late writing it, but you're reading it...

Let's call ourselves even & move on, OK?


Powered by Blogger

Sunday, August 20, 2006

Using HTML Tables in Blogger Posts


For the three or four of you who are frequent readers of my blog (as opposed to the random 30 or 40 of you who find yourself here via Google searches), you may have noticed that my previous post was formatted really poorly for a while (there was a huge amount of whitespace above the HTML table in the entry).

A little Google searching led me to this Blogger Help page, which explained that Blogger automatically puts a <br /> commands after each line break in a blog post (you can change that in the configuration screen if you want, but then you have to manually put in HTML <br>'s when you type your posts & who wants that...).

Anyway, I had created my table, as many people do, with code that looked like this:


<table>
<tr><td>Blah, Blah, Blah</td></tr>
<tr><td>Blah, Blah, Blah</td></tr>
<tr><td>Blah, Blah, Blah</td></tr>
</table>

and so Blogger was adding the <br />'s after each carriage return in that code (which HTML interprets above the table, apparently). The solution, as stated on the help page, is to remove all the carriage returns from the table code, so it looks more like this:


<table><tr><td>Blah, Blah, Blah</td></tr><tr><td>Blah, Blah, Blah</td></tr><tr><td>Blah, Blah, Blah</td></tr></table>

Voila! No whitespace above the table!

I've said it before and I'll say it again: God Bless Google! Both for documenting the problem and the fix so completely on the help page, and then for providing a search engine that made it so easy to find that help page, without going to the Blogger help site & paging through multiple entries...

They've certainly got their bases covered, those Google folks...

posted by Brian at 1:16 AM


18 Comments:

Post a Comment

<< Home