Monday, May 12, 2008

Style and Cheat Sheets

I've added a new set of pages for Cheat Sheets of things I do regularly, but not regularly enough to remember the exact syntax. I copied the first one from Samat Jean's blog so I had to make his style work for me. His html looks like this:
<div class="codeblock"><code>some code</code></div>

So I had to try to make this work with the andreas09 theme I'm using. Turned out to be simple to add this to the style.css file:
/* CodeBlock */
.codeblock {
padding: 5px;
border: 1px solid #CCC;
background-color: #EEE;
font-size:1.6em;
}

Form my own in-line code, I prefer:
pre {
border: 1px dashed #bbb;
font-size: 75%;
padding: 5px;
color: #202020;
background: #F1F1FF;
overflow: auto;
font-size:1.6em;
}

So it turns out if I simple get rid of the Code Block entry and define a style for code I get what I want, almost:
code {
border: 1px dashed #bbb;
font-size: 75%;
padding: 5px;
color: #202020;
background: #F1F1FF;
overflow: auto;
font-size:1.6em;
}

But not quite.

No comments:

Post a Comment