sNews Forum

Website Talk => CSS => Topic started by: Sasha on June 23, 2008, 01:27:04 am

Title: Problem with element <code></code>
Post by: Sasha on June 23, 2008, 01:27:04 am
I have some problem with this stupid code <code>..if i use this in xhtml i can wrap ONLY this css code like this CODE
Code: [Select]
body{
margin:0;
color:#232323;
padding-top: 0px;
padding-right: 0;
padding-bottom: 0;
padding-left: 0;
background-attachment: scroll;
background-image: url(images/bg.jpg);
background-repeat: repeat-x;
background-position: top;
background-color: #f2f1df;
}
div, h1, h2, h3, h4, p, form, label, input, textarea, img, span{
margin:0; padding:0;
}


but if i want to wrap php code or div code i cant.Also i look over internet for 4 hours and cant found fix.YES i also use element <pre></pre> but this dont work for <div> or <?php...

Im so freaking pist right now i almost beat up my neighbor and i dont know what to do next expect throw my pc through the window. ... >:(
Title: Re: Problem with element <code></code>
Post by: jlhaslip on June 26, 2008, 04:04:59 pm
Try removing the php tokens from the code???
Title: Re: Problem with element <code></code>
Post by: Sven on June 27, 2008, 08:03:14 am
Hello Sasha
maybe you didn't encode your chars, like this :
Quote
<pre>&lt;div&gt;&lt;?php(...)</pre>
You can use the text entity: &lt; or its numeric equivalent &#60; for openning
and &gt; or &#62; for closing.
You can see an example on this page (in french) about correct HTML tagging (http://www.hiseo.fr/optimisations/html-un-langage-descriptif/)
See this page (http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references) for List of XML and HTML character entity references.