|
Posted by Adam Pflug on 10/01/05 12:32
I dont exactly know what you want to do here, if you are just looking
to make it so that the pre forces a line wrap (at least if the line can
be wrapped) after a certain number of characters you can do it with an
entry on your stylesheet. Unfortunately you cannot use the "pre" tag
because the disables word wrapping, however unless you need whitespace
preserved (which is what the pre tag is supposed to be used for) then
you can duplicate the effect you want with the following css code:
..code
{
font-family: courier, monospace;
width: ###em;
}
Where ### is the number of characters to be allowed on a line.
If you want to dynamically figure out how many characters to allow on a
line just do this:
..code
{
font-family: courier, monospace;
width: 100%;
}
The html block would look like this:
<div class="code">This is some code</div>
Dont forget to use < and > instead of < and >
Navigation:
[Reply to this message]
|