18

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?

7

Set the word-wrap property to normal.

9

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

  • +1: Finally, a syntax highlighter that doesn't copy over the line numbers! Many thanks, sir! – jay Sep 13 '10 at 3:00
1

Use Code Prettify.

I' have written some notes on how to.

0

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.

0

Using Github Gist, you can create "pretty" code which you can embed within a Blogger post. If you modify this code anytime, it will automatically show up in the blog post as well.

-1

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

just write/paste code there.

  • How does it answer the question? – Thierry Dalon Sep 8 '16 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy