Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I noticed that when I post source code in a Blogger post, the code wraps to the next line if it's too long. I use the pre tag to post the code and I used different styles (overflow: auto; white-space: pre), still the code wraps in all browsers except in FireFox.

Is there a way to post source code without having the code wraps?

share|improve this question
up vote 6 down vote accepted

Set the word-wrap property to normal.

share|improve this answer
Thanks a lot, worked like a charm! – Jan Sep 6 '10 at 0:37

Checkout Syntax Highlighter if you already haven't. You can easily integrate it with blogger.

share|improve this answer
+1: Finally, a syntax highlighter that doesn't copy over the line numbers! Many thanks, sir! – Jay Sep 13 '10 at 3:00

Use Code Prettify.

I' have written some notes on how to.

share|improve this answer

Click on New Post Then Compose Mode write your code there. enter image description here

just write/paste code there.

share|improve this answer

I've been using PreCode and SyntaxHighlighter for a while and it seems to work best for me. My blog readers also enjoy copy/pasting functionality built-in.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.