Have you ever seen on websites where they show you some lines of code and those lines are seperated in a little box and clearly demarcated from the rest of the page? I’ve always wanted to be able to do that, now i can. I’ve edited the style.css page here and added a style for the code tag. Once i get it how i want it i’ll retroactively put code tags around all the code i’ve ever posted. See below for what i settled on.
pre {border: inset 1px blue;
font-size: 1.3 em;
color: blue;
margin: 10px;
padding:10px;
background: #fde8b9}
*Update*
I’ve finished adding the pre tags to the rest of the code on the site. That right i said pre tags. Turns out, pre, standing for “preformatted text”, reproduces exactly what is in the text including whitespace, etc. This was more useful than the code tags which don’t quite do that. Also, i found out that if you paste something from dreamweaver mx into a post and then save it, it drops everything after what you pasted and crashes the browser. So…don’t do that.

One comment
Leave a reply