Page 1 of 1

PRE-Content within CSS content

Posted: Fri Dec 23, 2005 12:11 am
by ghostrifle
Hey there,

I'm using some tools to generate HTML from C/C++ source which I wanna put in cms pages. The tools throw out html code with pre-tags. It seems like CMS don't like this kind of tags. Is it a problem of CSS or cms how it handles / uses this stuff?

Have a look at this page to see what I mean: http://www.damage-done.net/index.php?page=LEDS_anschalten

Is there a way to format the code correctly ?? Any other solutions are welcome !

Re: PRE-Content within CSS content

Posted: Fri Dec 23, 2005 8:44 am
by petert
ghostrifle wrote: Hey there,

I'm using some tools to generate HTML from C/C++ source which I wanna put in cms pages. The tools throw out html code with pre-tags. It seems like CMS don't like this kind of tags. Is it a problem of CSS or cms how it handles / uses this stuff?
Is there a way to format the code correctly ?? Any other solutions are welcome !
Looks indeed like th e tags are messing things up.
You can redefine the pre tag in css so that it will look like it's supposed to.

Re: PRE-Content within CSS content

Posted: Fri Dec 23, 2005 9:10 am
by ghostrifle
uhhmm.. how's the code for this ... I'm not a css guru and I don't understand exactly what you mean.


thanx for your help

Re: PRE-Content within CSS content

Posted: Fri Dec 23, 2005 1:45 pm
by westis
The tag displays the text just as it is showed in the source code (preserving line-breaks and spaces). It looks like there are no line breaks in your source code and therefore that will display the same on your page.

Is the tool you are using generating the HTML without line breaks? Then you may have to apply these line breaks manually or remove the tags and replace them with for example

Then in your stylesheet, put something like this to get the same font as when you're using pre:

Code: Select all

.pre {
  font-family: courier-new;
  }

Re: PRE-Content within CSS content

Posted: Fri Dec 23, 2005 5:03 pm
by ghostrifle
Well, the problem was FCKEditor which ripped my linebreaks.... uhhmm.. but not the literals are causing trouble..... replacing {} with {literal}{/literal} didn't work somehow... have to check it again