Saturday, August 13, 2011

Keeping up appearances

Something's changed in blogger that messes with my code examples. The last normal one is from Sat August 6, and the first unusual one is from last Thu August 11. It looks the same as ever in Preview mode, but after publishing, all the code text has acquired an extra newline and is double-spaced.

Code is enclosed within tags:

<div style="overflow-x: scroll ">
<table bgcolor="#ffffb0" border="0"
width="100%" padding="4">
<tbody>
<tr>
<d>
<pre style=" hidden;font-family:monaco;">
..
</pre>
</table>
</div>


I liked this method because the output is monospaced, and the background colored according to the type of code (Python, R, output, etc).

I guess I'll have to look into CSS. If anyone has a good set of instructions to point me to, I'd be grateful.