November 15, 200718 yr I've built a site which integrates an iframe. noe the problem is the visual area for the iframe is specialized with the background design and would like the scrollbar to be shorter than the entire frame but can still scroll the whole frame... is there any way to set the height of the scrollbar? to visualize my dilemma i've posted a picture at www.jestley.com/downloads/iframe.jpg
November 15, 200718 yr The scrollbar is dependant on the height of the iframe, so for your example just set a height for the iframe and you should be good to go!
November 15, 200718 yr The scrollbar is always the height of the content. In general you should avoid trying to adjust or change the default behaviour of browser elements. It mostly makes things more complicated. Also, a scrollbar at the very right end of the browser window is better from a usability viewpoint. Most applications keep their scrollbar at the edge and people expects to find it there. And there's a good reason why it's at the very edge because it means that when the window is maximized you can just slam your cursor to the edge and hit the scrollbar. If the scrollbar is further in you have to slow down and aim for it. Check out Fitt's Law for the most basics rules/guides of user interfaces. (And frames makes it hard to bookmark pages and generally causes other griefs for the user.)
November 15, 200718 yr If you "must" use a scrollbar like that you also might want to look at using a <div> with style overflow: auto; - this will have the same effect
November 15, 200718 yr Author While i appreciate the feedback, i understand the change in conventions there, but is it possible to make the scrollbar shorter than the frame height and still have it control the frame?
November 15, 200718 yr While i appreciate the feedback, i understand the change in conventions there, but is it possible to make the scrollbar shorter than the frame height and still have it control the frame? No. There's no control over the scrollbars in HTML/CSS except being able to show or hide them.
November 15, 200718 yr Javascript is the way to do it, still you'll need to forget your iframe(xHTML) and work with divs
Create an account or sign in to comment