Monday, December 04, 2006

Formatting Strangeness

I've ranted before about blogger's weirdness - currently, blogger Beta is doing odd things to paragraph formatting - some of what I write appears as 1.5 line spacing (which I like) and some appears as 1.0 line spacing (which I think is too cramped). Sometimes it shifts in the middle of a post, for example the preceeding post about Seed magazine.

Does anybody know what's going on, here? I've looked at the HTML code for some articles, and I can't seen any obvious tags that would shift paragraph formats around. What should I be looking for?


Anonymous said...

The font properties won't appear inline with the HTML surrounding your text because Blogger uses cascading style sheets (CSS).

The problem doesn't actually seem to be with those, however.

Take a look at the HTML near the paragraph ending with "I think Dr. Myers makes this point very well in his review.". You should see the following (brackets replace <> due to blogger commenting restrictions):

(/span)(br)(br)(span style="font-family: Arial;")(hr)(br)(/span)(span style="font-family: Arial;")

Replace it with:

(/span)(br)(br)(hr)(p)(span style="font-family: Arial;")

Or, simply insert "close paragraph: (/P) tag before the problem section, and start the new paragraph with a (p) tag.

For whatever reason, Blogger didn't format the trouble sections as "paragraphs". Adding the (p) and (/p) tags fixes that.

I have no idea what the Blogger backend looks like (although I have a picture of a crappy WYSIWYG editor in my mind), but those two sections of text should appear to be formatted differently. In Dreamweaver for example, the correctly spaced section is "paragraph" format with an Arial font (the rest is controlled by CSS). The incorrectly spaced section has "no" format, with an Arial font.

Anyway, chances are good this is simply a flaw in the WYSIWYG-to-HTML conversion. Those things are rarely perfect and often produce clumsy, non-standard code.

Sorry, I probably sucked at explaining that.

Carlo said...

I've had a lot of problems when I first switched as well. The annoying thing is that, as Mike said, the Blogger front-end makes a lot of 'decisions' for you, and sometimes screws up (much like MS Word in very large documents).

I like to go and change all of the HTML tags around in my posts, but Blogger usually converts these back to its own stupid format. I've found that it screws up less when you stick to defaults...

TheBrummell said...

Thanks Mike, putting (p) in a couple of places seems to have fixed the problem. I'll have to put those into future posts, but that seems easy enough.

The Blogger backend does look like a crappy WYSIWYG editor, because that's almost what it is - it's not truly WYSIWYG because it fucks around with colours and space restrictions. I usually don't know exactly what my posts will look like until I click "Publish".

I hate the defaults for Blogger; Serif fonts piss me off, which is why I generally use Arial. It's the zeal of the recent convert - I used to write everything in Courier New and now I won't touch it. Times New Roman is just irritating.