Results 1 to 8 of 8

Thread: Change scroll bar size?

  1. #1
    Join Date
    Nov 2005
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Change scroll bar size?

    I have an Iframe on a webpage and I want to make the scrollbar thinner.

    Here is the page in question:

    http://www.freewebs.com/automata/splash.html (click on the logo, the site opens in a popup)


    I'm not sure if the code needed would be HTML or not.

    I would think there would either be a code to put in the "Iframe src=" code to change scroll bar size, or a code I could put on the page that opens in the Iframe.

  2. #2
    Join Date
    Mar 2006
    Location
    SoCal, USofA
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I don't think that's possible... with flash maybe.

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by rohis
    I have an Iframe on a webpage and I want to make the scrollbar thinner.
    Scrollbars are often provided by the operating system, therefore changing the appearance significantly would require alterations at the operating system level.

    Mike

  4. #4
    Join Date
    Jul 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by rohis
    I have an Iframe on a webpage and I want to make the scrollbar thinner.

    Here is the page in question:

    http://www.freewebs.com/automata/splash.html (click on the logo, the site opens in a popup)


    I'm not sure if the code needed would be HTML or not.

    I would think there would either be a code to put in the "Iframe src=" code to change scroll bar size, or a code I could put on the page that opens in the Iframe.
    If Are Using a Free Webhost they probably write headers onto your pages and it therefor may not be possible to, change certaint things like scrollbars they also may have there own limmetations set on what script types can execute on your web site. I May Be wrong butit is a possibility. Also BUY A SERVER DAMMIT! ITS BETTER THAN FREE HOSTING! lol, jk but free hosts do suck.

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,475
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Mike is right about the scrollbars being a part of the operating system on the client's computer so, the only way to customize the width of a scrollbar would be to set the attributes and or style properties of the element that you want to customize in this fashion in such a way that it did not display the user's system scrollbar and then, via javascript, create a new scrolling method for the element, using your custom made scrollbar(s). I have seen this done but, it is hardly worth the effort, certain to break down on non-javascript enabled browsers and almost certain to break down on some browsers even with javascript enabled, owing to quirks in their interpretation of your code.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Jan 2008
    Location
    Los Angeles
    Posts
    98
    Thanks
    31
    Thanked 2 Times in 2 Posts

    Default

    Can I open this up again and ask what size would one typically allow as a safety to fit a possible scrollbar... 20-30 pixels?

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,475
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by questions View Post
    Can I open this up again and ask what size would one typically allow as a safety to fit a possible scrollbar... 20-30 pixels?
    That's about right, 25 should be plenty. I just measured IE 7's on XP using IE developer toolbar's ruler at 20. However, in actual practice I have found that 22 can sometimes be required in some browsers to account for it, so 25 would be on the safe side. On FF and Opera, where the only difference between the two measurements below should be the scrollbar, it's reported here as 17:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    body {
    overflow-y:scroll;
    }
    </style>
    </head>
    <body>
    <script type="text/javascript">
    alert(window.innerWidth - document.documentElement.clientWidth);
    </script>
    </body>
    </html>
    But I think that's just a tad low.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. The Following User Says Thank You to jscheuer1 For This Useful Post:

    questions (08-05-2008)

  9. #8
    Join Date
    Jan 2008
    Location
    Los Angeles
    Posts
    98
    Thanks
    31
    Thanked 2 Times in 2 Posts

    Default

    Thanks!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •