Page 1 of 1

overflow on code

Posted: Fri May 27, 2005 10:54 pm
by Skara
ok, I'm feeling kinda stupid, but I can't recreate the code thing on here for the life of me...

It'll always put the scrollbars there and it'll never scroll. -_-'

as so:

Code: Select all

echo "short line example";

Code: Select all

echo "really really really really really really really really really really really really really really really really really really really really long line";

Posted: Fri May 27, 2005 11:33 pm
by method_man
so whats the question?
do you want it to autobreak or somthin?

Posted: Sat May 28, 2005 2:03 pm
by Skara
I want to figure out how to do the above in the simplest way possible.

Yes, I've looked at the source and css. Yes, I still can't figure it out.

For some reason, whenever I try and copy the css, It gets it all wrong. :/

Posted: Sat May 28, 2005 3:40 pm
by Burrito
huh?

I have no idea what you're talking about...course I might of eaten a bad bowl of Wheaties this morning....

Posted: Sat May 28, 2005 3:46 pm
by JAM
Burrito wrote:huh?

I have no idea what you're talking about...course I might of eaten a bad bowl of Wheaties this morning....
Hehe, he actually means this:

Code: Select all

echo "See Burrito? PHP tags in the forum... really really really really really really really really really really really really really really really really really really really really long line";
I on the other hand doesn't understand "It'll always put the scrollbars there and it'll never scroll. -_-' " :oops:

Posted: Sat May 28, 2005 3:48 pm
by Burrito
I still don't understand. It scrolls fine for me, was that the question/problem?

scrolls fine in FF and IE for me...maybe you ate the bad Wheaties 8O

Posted: Sat May 28, 2005 8:27 pm
by Skara
>.> Wow, I must be worse than I thought at explaining things.

>> I want to be able to recreate the above scrolling. <<

My problem is, I can't. I keep goofing it somehow.

Here's (simplified) what I've got:

Code: Select all

<table><tr>
<td>numbers here</td>
<td style=&quote;width: auto; overflow: scroll;&quote;>code here</td>
</tr></table>
What happens is, I always get scrollbars there, but they don't do anything. The text still wraps. O.o My question is, what do I put for the td style?

Posted: Sun May 29, 2005 8:03 am
by JAM
This works on my end. You see the basics here, so by using this you should manage to edit whatever.
(Using Firefox only. Not verified on IE or other browser.)

Code: Select all

<html>
<body>
<style>
/*	PHP & Code Blocks */
/*	feyd -=AT=- devnetwork :: &#1111;php] mod :: 2005feb07 :: Slighly ripped by JAM */
.php {
 padding:0 10px 0 10px;
 margin:0;
 width:auto;
 overflow:auto;
}
</style>
<div class=&quote;php&quote;>
    <table>
        <tr>
            <td width=&quote;100%&quote;>
                <pre>really really really really really really really really really really really really really really really really really really really really long line</pre>
            </td>
        </tr>
    </table>
</div>
</body>
</html>

Posted: Sun May 29, 2005 7:42 pm
by Skara
hm... I edited the above a bit, and got the scrolling working, but I'm getting a big gap above and below the code.

Simplified:

Code: Select all

<table><tr>
<td style=&quote;vertical-align: top;&quote;>lines</td>
<td style=&quote;vertical-align: top; margin: 0px; padding: 0px; width: 100%;&quote;><pre style=&quote;width: auto; overflow: auto;&quote;>code</pre></td>
</tr></table>
Screen:
Image

I've checked, and the main td is all one one line. :/


Edit: nvm, I needed 0px margin in the pre tag. ^_^

Thanks guys!