Fixing Code


I really havenít liked the way the code routine displays on my blog. It adds a lot of white space and generally looks bad…

I really havenít liked the way the code routine displays on my blog. It adds a lot of white space and generally looks bad. To make things a bit nicer, I removed the Code: message, set the overflow to auto instead of scroll, and I removed the extra breaks.

Here is the CSS Iím using:

.codepost {
 background-color: #ffffff;
 width: 100%;
 white-space: nowrap;
 overflow: auto;
 padding-left: 2px;
}

I had to play a bit with the internal routines for dealing with newlines in edits so that it wouldnít double up the line breaks. I think it is all working now. What do you think?



Comments on this article:

No comments so far.

Write a comment:

Type The Letters You See.
[captcha image][captcha image][captcha image][captcha image][captcha image][captcha image]
not case sensitive