Sunday, July 11, 2010

Computer code on Blogger.com?

How do you post computer code (java, c, ruby, etc) in a post on Blogger.com w/o it getting mangled, truncated and so forth? Is there any way to have a "code box" that has sliders (vertical and horizontal) so that a reader can look at the code?





Thanks.

Computer code on Blogger.com?
The easiest way to do it is to use a text box. Go to 'Edit HTML' and insert the following and adjust the cols and rows values as required:





%26lt;textarea cols="40" rows="8" name="textbox1"%26gt;


Put the code here.


%26lt;/textarea%26gt;





You can see an example on my site here:


http://bloodycomputer.blogspot.com/2007/...

brushing teeth

No comments:

Post a Comment