Trouble Getting Color into <pre> section
-
I am wanting to color code my “code” and I have what I think should work in my css file and in my posting html file. I’ve shown the relevant parts below. It seems to ignore my kwrd class definition. Any help would be appreciated.
CSS:
pre {border: solid 1px black;
font-size: 1.3 em;
color: black;
margin: 10px;
padding:10px;
background: #FFFFFF}
code {font-size:1.2em;
color: #008099}.csharpcode
{
font-size: small;
color: black;
font-family: Courier New , Courier, Monospace;
background-color: #ffffff;/*white-space: pre;*/
}
.rem { color: #008000; }
.kwrd { color: #0000ff; }Posting HTML:
<pre class=”csharpcode”>
[DataObject(<span class=”kwrd”>true</span>)] <span class=”rem”>// This attribute allows the </span>
<span class=”kwrd”>public</span> <span class=”kwrd”>class</span> MembershipDataObject
{
<span class=”rem”>/// <summary></span>
<span class=”rem”>/// An empty constructor is necessary for iterator in Get</span>
<span class=”rem”>/// </summary></span>
<span class=”kwrd”>public</span> MembershipDataObject()
{
}</pre>
- The topic ‘Trouble Getting Color into <pre> section’ is closed to new replies.