Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

When writing a blog post using Google's Blogger, you can do so using "Compose" mode (a WYSIWYG editor) or HTML mode. When using HTML mode, if I write:

<ol type="a">
<li>Item a</li>
<li>Item b</li>
</ol>

it correctly displays a lowercase lettered list when viewed in "Compose" mode. However, when I actually publish the post, it reverts back to a numbered list in my blog (despite the HTML source remaining the same as above). Any suggestions on how to fix this?

share|improve this question
    
Instead of type="a", can you use the equivalent inline style: style="list-style-type:lower-latin"? –  w3d Nov 21 '12 at 15:33
    
That fixed it. Thanks. I'll accept your answer if you post it. Although I would still like to know why type="a" doesn't work. –  Marc Nov 21 '12 at 18:10
add comment

2 Answers 2

up vote 1 down vote accepted

As mentioned in comments, instead of the attribute type="a", use the equivalent inline CSS style:

<ol style="list-style-type:lower-latin">
<li>Item a</li>
<li>Item b</li>
</ol>

Apart from the type attribute being deprecated in HTML 4.01, if there are any CSS style rules set in your blogger stylesheet that specifically set the list-style-type then this will override the type attribute.

(I assume that whilst in "Compose" mode the full/theme stylesheet is not applied.)

Specifying an inline style on the element itself overrides any style specified in the external stylesheet.

share|improve this answer
add comment

Re why your approach works in Compose mode, but not once you publish:

Remember that the Blogger Post-editor is just another WYSIWYG editor that gives you point-and-click tools, and generates the HTML for the features and content that you have chosen.

Luckily, they give us HTML mode too, so we can fix up the code behind posts when it's been mangled by the sometimes-buggy Compose mode features.

And when you switch from HTML-mode to Compose mode, it's clever enough to take whatever HTML you have entered, and draw it in the Compose mode window.

But if you then hit Publish from Compose mode, the post-editor takes the content you currently have in the Compose windown, and re-generates the HTML based on the cut-down set of HTML features that it supports. So any extras that you added via HTML that is perfectly valid, but not supported (yet!) by the post-editor are lost.

The solution is to hit Publish when you are in HTML mode, because this seemily doesn't cause the HTML to be re-generated with the cut-down features.

(NB I haven't tried this on the particular problem you are mention. But it has worked for me in a number of other areas where certain HTML elements, eg paragraph tags, have been stripped out when I publish from Compose.)

Of course the in-line styles answer mentioned works too: If you define the style in the post as suggested, then it will be applied when you view the post in Compose mode. But if you add it as a rule to your template, then it won't be applied in Compose mode, but will be applied for people who view your blog using a web-browser.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.