开发者

css problem the text appear without spaces

i have a big problems in showing my codes its appear as one text "not have spaces" example

$paypal = new phpPayPal();

it will appear

alt text http://img52.imageshack.us/img52/4531/65061412.gif

live example

the css file 1 the css file 1

any my question is how to ma开发者_StackOverflow社区ke with spaces all this is in SyntaxHighlighter


You don't see the spaces, because the content doesn't contain the spaces. You could put a "padding-right: 10px;" on ".syntaxhighlighter code" around line 44 of core.css to give a similar effect.


Are you developing the syntax highlighter or just using it?

If developing, you shouldn't trim spaces when splitting the tokens of the original code, instead just replace them with   so they are displayed in the output.

Cheers


Your highlighter is a flash file, and it has nothing to do with CSS or even javascript. You need to look in the flash code where it puts certain keywords in tags. It seems to also replace the following space character.

If it's not the flash file, you need to find the javascript that does this. I couldn't find it. CSS cannot remove characters, and it can't transform a non-tagged pre tag content into that detailed highlights.


David solution is very cool

padding-right: 5px !important;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜