Jump to content

Can we get a better CodeBox


MrJinje

Recommended Posts

Current codebox is not respectful of my screen resolution and does not create proper scroll-bars. In most cases it spans the entire length of the longest text and the lower scroll-bar (if showing), only scrolls maybe a 1/2 inch left or right, even when half the text is hidden off-screen.

You can clearly see in the first picture how it trails beyond the width of my screen (1280x1024)

codebox1.png

But in the second picture, it closes itself off within the normal frame width, and provides a proper scroll-bar.

respectfulcodebox.png

Can we fix the CODEBOX to work like the second picture and force it to keep it's scroll-bar in proportion to the HTML page width. The intent is to be able to display and view a script without word-wrap and without having to scroll firefox off-screen to do it.

Edited by MrJinje
Link to comment
Share on other sites


Yes, in Opera it looks fine.

Even using the +/- "zoom" keys.

I would vote for the Codebox being "right" and IE and Firefox being not.....:whistle:

Very quick possible workaround ;):


@echo off
IF EXIST "%~dp0BIN\REG\*.reg" (
FOR /F "tokens=*" %%A IN ('DIR /B "%~dp0BIN\REG"') DO (
start /wait regedit /S "%~dp0BIN\REG\%%A"
)
)
IF EXIST "%~dp0BIN\VBS\*.vbs" (
FOR /F "tokens=*" %%A IN ('DIR /B "%~dp0BIN\VBS"') DO (
start /wait %SystemRoot%\system32\cscript //nologo "%~dp0BIN\VBS\%%A"
)
)
IF EXIST "%~dp0BIN\MSI\*.msi" (
FOR /F "tokens=*" %%A IN ('DIR /B "%~dp0BIN\MSI"') DO (
start /wait %~dp0BIN\MSI\%%A /QN
)
)

Does the above look allright on the "other" browsers? :unsure:

....ducking, very, VERY quickly...;)

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

What browser? Resolution? Link to above example? More info please.

Thank you.

Strel posted the link a few back, 1280x1024 in both IE8 and Firefox 3.5+ under Windows 7 x64.

If this is a Firefox / IE8 issue, is there/are there any settings I need to adjust locally to fix this. (but that don't explain how MDL manages the trick)

Here is a link to the second image. MDL is using vBulletin, not sure if that plays a factor, but their "CODE" tag creates proper scrollbars, (both up and down and side to side) whereas here the "CODE" tag does word-wrap instead of a scroll bar, and the "CODEBOX" tag just doesn't play nice with my browsers. Could this be something specific to vBulletin ?

Either way it isn't a big deal, if it can't be done, it can't be done, just thought I would check.

Edited by MrJinje
Link to comment
Share on other sites

A sufficiently large codebox causes it in IE8 and FF, and I'd be willing to wager a lot of the overflow-x and overflow-y CSS is causing it. It's one of the very specific areas IE and FF are actually similar, and given the exact behavior between the two (which is rare), I'd say it's probably not easily fixable. Again, "smaller" code boxes seem to look just fine - but when they get large, they overflow.

Link to comment
Share on other sites

A sufficiently large codebox causes it in IE8 and FF, and I'd be willing to wager a lot of the overflow-x and overflow-y CSS is causing it. It's one of the very specific areas IE and FF are actually similar, and given the exact behavior between the two (which is rare), I'd say it's probably not easily fixable. Again, "smaller" code boxes seem to look just fine - but when they get large, they overflow.
It doesn't happen on my Mac in FF. :rolleyes:
Link to comment
Share on other sites

How large are you making your browser window? For example, first picture is a FF 3.5.7 window at 1024x835 (note the codebox extension outside of the post window container), and the second picture is the same browser, same machine, same site, same page, but at 1123x865, which shows everything "fine". Also note it does it with IMAGES inline too, third picture (it's a picture of this post before I edited it, and so far the fabric of space/time hasn't been rent in two, yet... :)):

FF_long_codebox_notworking.png

FF_long_codebox_working.png

FF_images_notworking.png

Link to comment
Share on other sites

IPB3 has all new codeboxes that work super well. When we upgrade to IPB3 (might be 3.1 at this rate) it'll help immensely.

About IPB 2.3 codeboxes:

Note: This is in no way a bug. The codebox tag is intended to work this way. The codebox preserves linebreaks as they are entered, in the event that you have a piece of code that entering a linebreak in the wrong place would cause the code to no longer function.
Link to comment
Share on other sites

IPB3 has all new codeboxes that work super well. When we upgrade to IPB3 (might be 3.1 at this rate) it'll help immensely.
Anyone know a site already running IPB-v3, tried to sign up at InvisionPower's Demo site but they are full. (no demo slots available)
A sufficiently large codebox causes it in IE8 and FF, and I'd be willing to wager a lot of the overflow-x and overflow-y CSS is causing it. It's one of the very specific areas IE and FF are actually similar, and given the exact behavior between the two (which is rare), I'd say it's probably not easily fixable. Again, "smaller" code boxes seem to look just fine - but when they get large, they overflow.

EDIT: Looking at this page, it may be possible to change both CSS overflow-x and -y settings to "scroll" and get the desired result. This would have the added benefit of shortening up post size when people decide to paste instead of attaching their unattend.xml

Edited by MrJinje
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...