PRE-Content within CSS content

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Post Reply
User avatar
ghostrifle
Forum Members
Forum Members
Posts: 54
Joined: Wed Mar 02, 2005 11:03 pm

PRE-Content within CSS content

Post 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 !
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm

Re: PRE-Content within CSS content

Post 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.
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
User avatar
ghostrifle
Forum Members
Forum Members
Posts: 54
Joined: Wed Mar 02, 2005 11:03 pm

Re: PRE-Content within CSS content

Post 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
westis

Re: PRE-Content within CSS content

Post 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;
  }
User avatar
ghostrifle
Forum Members
Forum Members
Posts: 54
Joined: Wed Mar 02, 2005 11:03 pm

Re: PRE-Content within CSS content

Post 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
Post Reply

Return to “Tips and Tricks”