Richard Howells' Blog

Learning more about DNN/CSS Styling

Frankly my original recommendation for formatting code snippets was rubbish.

Some reseach in the DNN docs (poor) led me to the docs for FCKEditor (as used by DNN and much better docs).  They told me how to create my own set of styles for the editor (surprisingly simple).  Back on the DNN site I found in the forums information on how to integrate my new styles with the site.

So now my editor styles file looks like this...



<?xml version="1.0" encoding="utf-8" ?>
  <Styles >
  <Style name="Code" element="div">
    <Attribute name="class" value="code" />
  </Style >
  <Style name="Normal" element="span" >
    <Attribute name="class" value="normal" />
  </Style >
</Styles>

 
 
 
 

And my added CSS rule looks like this...(Update 18March08.  Actually it doesn't.  I implemented Matin's suggestion from the comments.)

.code
{
       background-color: #ffff99 ;
       border-style: groove;
       font-family: 'Courier New' , Courier, monospace;
       font-size: x-small;;

}

I hope you like it! 

Posting Archive
Copyright 2002-15 by Dynamisys Ltd