Tuesday, August 4, 2009

HTML Scroll Down Box for Code

To keep the size of the code chunks manageable, we can generate a scroll down box like the one below. This is easily done by using the code in the box when you write the post.
The following code creates a box:
<div style="overflow: auto; height: 150px; width: 400px;">
<table style="width: 250px;" cellpadding="0" cellspacing="0"><tbody>
<tr><td><code> PUT YOUR CODE HERE.

Note that the tags <code> and </code> are not necessary, however, they are handy to put things in courier font to differentiate the code from the rest of the text.

No comments:

Post a Comment