Scrolling code boxes?
|
Jun. 12, 2009, 05:35 PM
Post: #1
|
|||
|
|||
Scrolling code boxes?
Maybe just for the horizontal?
![]() BTW, somebody should probably unedit something. |
|||
Jun. 12, 2009, 11:14 PM
Post: #2
|
|||
|
|||
RE: Scrolling code boxes? | |||
Jun. 12, 2009, 11:21 PM
(This post was last modified: Jun. 13, 2009 01:53 AM by Kye-U.)
Post: #3
|
|||
|
|||
RE: Scrolling code boxes?
Testing:
Code: GET http://dsc03.taobao.com/i3/121/531/12d53e5197b5df51f6d06c5abd160535/T1cUVgXg6870JXXXXX.desc|var^desc;sign^61defec1cde8a714e157075bf8731f8d;lang^gbk;t^1240449428 HTTP/1.1 EDIT: Displays properly in IE 8 (and other browsers: Firefox, Opera 10 Beta, Opera 9.64, Chromium). ProxRocks, does it display properly for you? I notice that Opera 10 Beta automatically inserts linebreaks, whereas in all of the other browsers, it's just wrapped properly. EDIT 2: Replaced test with actual code block that produces the problem. |
|||
Jun. 13, 2009, 12:39 AM
Post: #4
|
|||
|
|||
RE: Scrolling code boxes?
(Jun. 12, 2009 11:21 PM)Kye-U Wrote: EDIT: Displays properly in IE 8 (and other browsers: Firefox, Opera 10 Beta, Opera 9.64, Chromium).IE6 on Win98se Shows vertical bars at the end of the test lines. Background and framing for boxes is odd. The horizontal scroll is missing from sidki's post. I can't remember the last time I used IE6 here, tho. Could have already been this way. Have you seen http://mods.mybboard.net/view-resource/s...-howto..,- |
|||
Jun. 13, 2009, 12:49 AM
Post: #5
|
|||
|
|||
RE: Scrolling code boxes? | |||
Jun. 13, 2009, 01:01 AM
Post: #6
|
|||
|
|||
RE: Scrolling code boxes?
(Jun. 12, 2009 11:14 PM)ProxRocks Wrote: my bad, wasn't thinkin' too clearly... Don't swing too far the other way. Administrators have responsibilities. I'm just not sure that those responsibilities include editing other Administrator's posts. ![]() We can't see each others' lives either. It might not matter too much next week, month, or year. Gotta go BTW, shouldn't "you're not using" be 'you are using'? |
|||
Jun. 13, 2009, 02:26 AM
Post: #7
|
|||
|
|||
RE: Scrolling code boxes?
I've tried to address the odd background and framing problem, as well as the overflow for horizontal scrolling. I don't have IE 6 on any of my computers, so I have no way of testing my fixes until I get to work next Monday
![]() |
|||
Jun. 13, 2009, 04:50 AM
Post: #8
|
|||
|
|||
RE: Scrolling code boxes? | |||
Jun. 15, 2009, 04:35 AM
Post: #9
|
|||
|
|||
RE: Scrolling code boxes?
I used my proxy to make some chages to the content of: prxbx.com/forums/cache/themes/theme5/global.css
I tried using some "100%" values to keep the code block within the window size but could not find a decent multi-browser solution for them. I ended up using an explicit width of 800 pixels. I'm not that good at CSS, there may be better solutions. First, in the main body definition I commented out the line-height: assignment. It was not terminated with a semicolon, and so the margin: setting was not being properly assigned. My change was to put the /* ... */ surrounding it. Code: body { Then I removed the previous overflow: auto from the .codeblock code section. My change was to put the /* ... */ surrounding it. Code: .codeblock code { Next I added attributes for white-space: and width: and max-width: and overflow: to the CSS definition for .codeblock section. They're shown here in upper case just for clarity. Code: .codeblock { I tested those in a few Firefox and Opera versions. They did not fully resolve IE-6 (see below), and I have not tested with any other IE version. For IE 6 browser only the overflow value needed to be changed from auto into scroll. Otherwise the scroll bars that it used would obscure some of the text being shown. That's illustrated in the attached 'IE6_Problem.gif' (using auto) vs. the 'IE6_Scroll_Fix.gif' (using scroll). So for IE 6 only, the style looks like: Code: .codeblock { My suggestion would be for the forum's CSS to exclude consideration of IE-6. Then anyone with that browser could use Proxo to customize the CSS to suit their particular needs. |
|||
Jun. 15, 2009, 01:06 PM
Post: #10
|
|||
|
|||
RE: Scrolling code boxes?
Maybe IE's conditional comments could help?
No other browser but IE: Code: <!--[if IE]> Only IE older than v7: <!--[if lt IE 7]> |
|||
Jun. 15, 2009, 02:51 PM
(This post was last modified: Jun. 15, 2009 03:00 PM by Kye-U.)
Post: #11
|
|||
|
|||
RE: Scrolling code boxes?
Thanks Graycode!
![]() I changed it to: Code: .codeblock code { Works fine here (at work; XP with IE 6) ![]() EDIT: I also changed the width of the code block from fluid (100%) to be fixed (800 + 10 padding = 810px). |
|||
Jun. 15, 2009, 04:21 PM
Post: #12
|
|||
|
|||
RE: Scrolling code boxes?
(Jun. 15, 2009 02:51 PM)Kye-U Wrote: Can others confirm this? awesome!... works here - WinXP, IE8-shell, screen-res at 1024x768 (cheap monitor, cursed it be, lol [i usually never have to worry about scrolling at home, larger monitors and higher res])... |
|||
Jun. 15, 2009, 05:06 PM
Post: #13
|
|||
|
|||
RE: Scrolling code boxes?
Thanks very much, but definitely no need to put credit in the CSS comments. I'm just trying to help a bit like many others.
A difference is that most of my changes were applied to the .codeblock { section while yours are to the .codeblock code {. I'd tried a few variants your way but couldn't find a decent combination, which you did by setting a width to 810. One quirk of that is where Firefox doesn't put a scroll bar on a wide one-liner. It just cuts off the visible portion prematurely. An example is: http://prxbx.com/forums/showthread.php?t...2#pid12652 I think that's one case that caused me to try applying the styles to the section of .codeblock {, which will include the "code:" heading, so that Firefox would always have its multiple lines. Things look much better now. That Firefox one-liner situation probably doesn't happen very often, maybe it's not critical, or maybe there's some other / better way to resolve it. |
|||
Jun. 15, 2009, 05:47 PM
(This post was last modified: Jun. 15, 2009 05:50 PM by JJoe.)
Post: #14
|
|||
|
|||
RE: Scrolling code boxes?
(Jun. 15, 2009 05:06 PM)Graycode Wrote: One quirk of that is where Firefox doesn't put a scroll bar on a wide one-liner. It just cuts off the visible portion prematurely. An example is: http://prxbx.com/forums/showthread.php?t...2#pid12652 I do have a scroll bar there with K-Meleon 1.5.3 and Firefox (1&3). Has this been fixed since Graycode's post? Looks ok in IE6. |
|||
Jun. 15, 2009, 06:12 PM
Post: #15
|
|||
|
|||
RE: Scrolling code boxes?
(Jun. 15, 2009 05:47 PM)JJoe Wrote:(Jun. 15, 2009 05:06 PM)Graycode Wrote: One quirk of that is where Firefox doesn't put a scroll bar on a wide one-liner. It just cuts off the visible portion prematurely. An example is: http://prxbx.com/forums/showthread.php?t...2#pid12652 Nope, I didn't touch anything after Graycode posted @ 1:06pm =] |
|||
« Next Oldest | Next Newest »
|