CharlotteTheHarlot Posted November 15, 2009 Posted November 15, 2009 You may have noticed that sometimes an extra wide chunk of code forces the post that it appears in to stretch past the right side margin (which in turn causes horizontal scrollbars to appear in the main browser window).Other times it does not do this and instead the CodeBox it appears in has its own horizontal scrollbars. This keeps the entire thread and all its posts to stay within the margin as it should, with no horizontal scrollbars in the main browser window.We kicked this around for a while in this thread. Some posters saw the problem, but I could not.But it just appeared to me in this thread on Post#12 in the Batch code. So I saved the page (CSS is embeded within <STYLE> tags), looked around and experimented.The bad code (right margin pushing): this is how the HTML looks:<div class='codemain'>STUFF</div>The good code (no right margin problem): occurs if I use the Insert Special Item > CodeBox, and the following HTML/CSS is generated:<div class='codemain' style='height:200px;white-space:pre;overflow:auto'>STUFF</div>Now I am not sure if others are also selecting the same thing: Insert Special Item > CodeBox, but the fact remains that sometimes the inline CSS style= gets added and sometimes not. Anyway, to fix those extra wide posts, this is the missing ingredient within that <DIV that needs to present:<div class='codemain' style='height:200px;white-space:pre;overflow:auto'>I tested and verified this by adding the bolded section to the saved page in that Post#12 batch code. The result was that all posts were identical in width and properly within the margin. The browser (Opera 10) window scrollbars went away.The strange thing is, I do not see Code anywhere as an option, just CodeBox. So I fail to see how it gets entered anyway. I hope I explained it clearly!
Yzöwl Posted November 15, 2009 Posted November 15, 2009 Perhaps it's because many of us, either use the 'fast reply' option where the 'insert special item' option isn't available or type in the tags, ([/b] or [b][quote][/b]) manually. Personally I type everything in manually whichever option is selected for the reply.The problems thus far have tended to be attributed to specific browsers and how they render the page information.
CharlotteTheHarlot Posted November 16, 2009 Author Posted November 16, 2009 (edited) Doh! You're right! I never clicked that Fast Reply button before. Ok, I'm in the Fast Reply right now and see what you mean, no special items. Here I'll try something:Wrap in code tags ...Testing123Testing123Testing123Testing123Testing123Testing123Testing123Testing123Testing123Testing123Testing123Testing123Testing123Testing123Testing123Testing123Testing123Testing123Testing123Testing123This is Opera 10 with Identify as Internet Explorer selected. I'll edit this post to describe any width issues I see.P.S. I just noticed that clicking on More Options kicks the editor into the Full mode.UPDATE: right margin did become broken. This code was generated:Wrap in code tags ...<div class='codemain'>Wrap in quote tags ...<div class='quotemain'>Manually added codebox tags ...<div class='codemain' style='height:200px;white-space:pre;overflow:auto'> Edited November 16, 2009 by CharlotteTheHarlot
Tripredacus Posted December 11, 2009 Posted December 11, 2009 I've done a bit of research on Codebox with this version of IPB and there is no easy answer. The "code" concerning Codebox formatting and use is all over the place in the source, and would require a major modification in order to make it work properly.With a possible move to IPB3 in the future, any extra effort in fixing a complicated bug like this may well end up being wasted time.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now