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 !
PRE-Content within CSS content
- ghostrifle
- Forum Members
- Posts: 54
- Joined: Wed Mar 02, 2005 11:03 pm
Re: PRE-Content within CSS content
Looks indeed like th e tags are messing things up.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 !
You can redefine the pre tag in css so that it will look like it's supposed to.
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!
CMSMS rules!
Now they call it Joomla, but it still sucks!
CMSMS rules!
- ghostrifle
- Forum Members
- Posts: 54
- Joined: Wed Mar 02, 2005 11:03 pm
Re: PRE-Content within CSS content
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
thanx for your help
Re: PRE-Content within CSS content
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:
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;
}
- ghostrifle
- Forum Members
- Posts: 54
- Joined: Wed Mar 02, 2005 11:03 pm
Re: PRE-Content within CSS content
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