News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SMF scrollbar problems?

Started by Artimidor, July 13, 2006, 04:34:46 AM

Previous topic - Next topic

Artimidor

I've noticed a very strange behaviour with SMF boards, obviously regardless of the theme one chooses... If I try to display a SMF board within a framepage, e.g. having a menu to the left and putting the board to the right, I see that SMF displays a completely unnecessary horizontal (!) scrollbar, even though the size of the graphics and the board elements don't exceed the displayed area. If you open the board in an own window and resize it to a size, which is smaller than the one which is displayed in the frame you don't get to see such a very disturbing horizontal scrollbar at all. This is also reproduceable for this Community Forum here, so it must be a general problem.

Has anyone of the programmers noticed this behaviour as well and has an idea how to avoid it?
Artimidor

Rudolf

I'm 99% sure that the scrollbar is generated by your browser possibly as a result of your HTML code. (Some(times) browsers put scrollbars even if they are not needed and the code is correct.)
Are you using iframes or normal frames? Have you specified how the scrollbars should behave on your frames?
Frames are an ugly thing.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Artimidor

#2
I use normal frames and don't have any problem with any other page being displayed in the main frame (around 3000 pages at my website), including my other still active message boards. Problem was encountered when viewing the page with IE.

I'll have to look if there's something strange in the frame definition code, but as it doesn't happen anywhere else, it looks to me like a SMF problem for now.
Artimidor

Artimidor

I fear the 1% possibility that the problem is SMF seems to be the case. I've check it now in detail and saw that the problem exists at the simplest framepage, however, only at Internet Explorer (at least version 6).

Here's a simple test framepage so that you can see what happens. A horizontal scrollbar is displayed, even though the visible content fits perfectly in.

Frame definition looks like that - nothing unusual...

Quote<frameset cols="150,*">
  <frame name="Inhalt" target="Hauptframe" src="page2.htm">
  <frame name="Hauptframe" src="http://www.simplemachines.org/community/" scrolling="auto">
  <noframes>
  <body>

  </body>
  </noframes>
</frameset>
Artimidor

Rudolf

OK, here is what I think.
Somewhere in the SMF there's some top level object that is set to 100% width.
I see that in IE the horizontal scrolling space is just about the width of the scrollbar, which explains everything.
While calculating element widths IE completely ignores the existence of the scrollbar, so the object width is the total box width. But IE has to make space to render the scrollbar, so it steals from the element.
And there you'll have the horizontal scrollbar, because the content will overflow the actual object.

Once long time ago I had the same problem with IE on iframes. Then I stoped using them.

So, I guess the 99,99% would still apply, because it is not an SMF problem per se. The SMF code is 100% valid, and logically correct.

I'm sure it could be fixed, by reducing a little bit the content width, but that would make it look ugly in modern browsers.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Artimidor

Sure its not an SMF problem per se, but there are lots of workarounds in the SMF code itself trying to prevent strange display in various browsers, not here. - Well, IE is still among the most used browsers, isn't it? Don't you think this issue is worth to be addressed in the code of SMF instead of a workaround by the user?
Artimidor

Rudolf

Let's try to be a little realistic here.
Yes IE is the most used browser, but how many users will want to put their forum in a frame?
Very little I can assure you.
The workarounds are about making the page look good when it is opened normally in the browser.
Frames are old and deprected.
I'm sure you have your reasons to use them, but the rest of the community no.

I'm not against putting a workaround in SMF, if anyone actually takes the time to find it. Probably I could try to dig up what I did back then when I had the problems, but frankly it's the last thing I want to do. So don't take it personally, if I'm not being too much helpful.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Artimidor

I hear your opinion, yup, and so I have mine concerning the usage frames. Nothing personal I can assure you as well. :)
Artimidor

Artimidor

Ok, the scrollbars display problem was fixed in the meantime rather easy with a little workaround, but here comes another scrollbar related question:

In order to customize scrollbars one usually adds stuff into a stylesheet file. Well, I did that as well here by putting the definitons into the style.css in my theme folder, so that the body part now looks like this:

Quote/* The main body of the entire forum. */
body
{
        background-color: #000000;
        margin: 0px;
        padding: 0px 0px 0px 0px;
        scrollbar-arrow-color: #999999;
        scrollbar-base-color: #999999;
        scrollbar-dark-shadow-color: #cccccc;
        scrollbar-face-color: #333333;
        scrollbar-highlight-color: #000000;
        scrollbar-shadow-color: gray;
        scrollbar-3d-light-color: gray;
}

However, the board doesn't interpret these lines... Is it not possible for some reason or is this the wrong place to put the code? Does anyone have an idea and has configured scrollbars that way for SMF already?
Artimidor

r'acquel

I'm facing the same problem, just installed the SMF board to open up in a frame :(

Quote from: Rudolf on July 14, 2006, 10:22:59 AM
OK, here is what I think.
Somewhere in the SMF there's some top level object that is set to 100% width.

Sounds like this could be the case. Curious to know where this lives and then set it to something like 95%. I'm facing the same problem after inserting the SMF board into a frame today. Keen to get rid of that unecessary scroll bar :(


Dannii

"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

r'acquel

#11
The horizontal scroll bar is evident in my browser IE 6.0 with that link.

It looks like the main background area of the forum has something set to 100% - that's where the visual re-size problem exists. The forum post boxes re-size ok. It could be the panel where the SMF copyright details live or actually, the panel where the top log-in panel lives as well.

The scroll bar is still there even with a gargantuan screen resolution of 1600 x 1200.

???

Still poking around to try and resolve it.

hmm

Artimidor

#12
As stated above I've already solved the problem of horizontal scrollbars with a very easy workaround for IE: If you want to make it work, simply define the frame making the part where the Forum part is shown with "always show scrollbar" (usually you say "display when needed").

Do it like this:


<frameset framespacing="0" frameborder="0" border="0" cols="0,*">
  <frame name="EmptyFrame" target="ForumFrame" src="empty.htm">
  <frame name="ForumFrame" src="http://yoursite.com/forum/index.php" scrolling="yes" noresize>
  <noframes>


Due to the fact that all Forum pages (especially when viewed inside a frame) usually exceed the displayed area anyway you won't notice the fact that the scrollbar is always shown, there's always something to scroll, at least at my Forum - so I assume it works for everyone else just as well:)

BTW: Because the SMF Forum is being displayed at my site within a mainframe and all other pages work without problem concerning scrollbars I've put the whole Forum into an own framepage (with the first frame having a size of 0), and this framepage definition has this needed scrollbar definition for SMF.
Artimidor

Advertisement: