It took me a while to configure the style of this blog as I wanted.
I needed a template that was clean, easy to read, and wide enough to post code.
I needed a simple way to format code, mostly Java or XML. I wanted to use free tools and I wanted to copy and paste the code from my IDE without touching it (no adding spaces or tabs, please).
So, I came up with this solution:
1. Select "Minima Lefty Stretch by Douglas Bowman". Then you have to modify the template... read on.
2. Make it 960px width and with a dark bg color.
<Variable name="bgcolor" description="Page Background Color"
type="color" default="#fff" value="#162541">
#outer-wrapper {
width:960px;
margin:auto;
background:#ffffff;
padding:10px;
text-align:left;
font: normal normal 100% Verdana, sans-serif;
}
3. fix the publication date line and the body line-height
<style>
.postmeta {
font-size:80%;
text-align:right;
}
.post-body{
// line-height: 1.6em ---- make sure you remove this
}
4. Add code formatting support with
csharpformat<style>
.postmeta {
font-size:80%;
text-align:right;
}
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: Consolas, "Courier New", Courier, Monospace;
background-color: rgb(240, 250, 230);
/*white-space: pre;*/
overflow: auto; overflow-y: visible;
padding: 10px;
border: solid 1px rgb(120, 125, 115);
}
.csharpcode pre { margin: 0em; overflow: auto; overflow-y: visible;}
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
5. To format my code, I copy and paste my code to
csharpformat (it works decently for Java too) and then I paste the result in blogger's HTML view.