overflow on code

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

overflow on code

Post 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";
method_man
Forum Contributor
Posts: 257
Joined: Sat Mar 19, 2005 1:38 am

Post by method_man »

so whats the question?
do you want it to autobreak or somthin?
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post 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. :/
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

huh?

I have no idea what you're talking about...course I might of eaten a bad bowl of Wheaties this morning....
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post 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:
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post 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
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post 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?
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post 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>
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post 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!
Post Reply