Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Vary scrollbar height

Featured Replies

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 :huh:

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!

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.)

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

  • 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? :mellow:

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? :mellow:

No. There's no control over the scrollbars in HTML/CSS except being able to show or hide them.

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.