software code field

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
rafi
Regular
Posts: 11
Joined: Wed Mar 24, 2010 7:21 pm

software code field

Post by rafi »

hello,

im looking for this funktion in serendipity

Code: Select all

want to
put 
code
in 
code-boxes
some way to do it?
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: software code field

Post by onli »

Hi
Of course. Surround the code b< <pre> and </pre>. I use
<pre class="code">...</pre> and following css:

Code: Select all

pre.code {
    margin: 0 14px 5px 14px;
    padding: 2px 0 2px 10px;
    border: 1px inset #bbb;
    width: 90%;
    overflow: auto;
    background: #F1F1F1;
}
If you want highlighting, have a look at the geshi-Plugin (although I've never used it).
sincerely
rafi
Regular
Posts: 11
Joined: Wed Mar 24, 2010 7:21 pm

Re: software code field

Post by rafi »

thanks for this hint works great
Post Reply