0

Hi,

Im trying to add code tags to my CSS.

Ive added the following to my CSS :

code {
    background-color: #F9F9F9; 
    border: 1px dashed #444444;
    color: black;
    font-family: momspace,"courier new";
    line-height: 1.1em;
    padding: 1em;
}

But when running my site in firefox the browser doesnt even seen the new entry in the CSS and in IE 8 it displays it but incorrectly.

A test page I have can be found here : http://fir3net.com/TEST/f5-ltm-basic-nat.html

Thanks...

4
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by vishesh
1

"code" is not a valid HTML tag. Browsers don't know what to do with it. You should make a class named code and then put that class on a div.

0

as reported by MM, css only works on valid tags, you cant add new tags
the [code=php] tags used on forums like this are not html, they are a plugin called bbcode, note square brackets, which is interpreted when the page is built and displayed in html, with colorcoding

.code {} // for a <element class='code'> multiple elements
#code {} // for a <element id='code'> single element only

Edited by almostbob: n/a

0

Thanks for your help Ive now added custom "code" classes which works fine.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.