www.webdeveloper.com
Results 1 to 5 of 5

Thread: iframe Vertical Scroll Bars

  1. #1
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    700

    iframe Vertical Scroll Bars

    Hi All,

    I know you can switch iframe scrollbars on and off. I also know that you can have the browser switch them on and off as required. However, it appears they have to be switched on and off together.

    This can create a confusing user interface. For example, the page in the iframe may be set to a width that fits nicely within the iframe's width, either with tables (pttooey... no comments neccessary) or with css. The browser detects a vertical overflow and enables the scroll bars. All ok so far, except that the horizontal scroll bar has nothing to do. Maybe it gets bored sitting there, or jealous of the vertical scroll bar, because it insists on allowing the user to scroll horizontally for 5 or 10 pixels. I tried reducing the width of the content, but that doesn't help.

    Is there a way to enable the vertical scroll bar, and disable the horizontal, (or perhaps send it off to do another job like negotiating middle east peace or something else that will get it off my window and keep it happy)?

    Thanks
    CTB
    Last edited by chestertb; 01-24-2004 at 07:05 PM.

  2. #2
    Join Date
    Jan 2004
    Location
    Alabama, United States
    Posts
    833
    i know that what you are asking can be done with non-inlines. try setting vscroll=true and hscroll=false. It is something like that, it's been a while since I have done anything with frames....

  3. #3
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    for ie you can use proprietary code
    <iframe style="overflow-x:hidden; overflow-y:hidden;"
    but it will not work in other browsers. The best solution is make the page inside the iframe fluid, use a % for width so that it will compress its self and never need to scroll. If the content is smaller then the container you have no scroll bars.

  4. #4
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    700
    Thanks Guys,

    The size thing probably isn't a solution, because the content will be generated dynamically, so I guess the users will just have to put up the the horizontal bar trying to help.

    Ah well. Never mind.

    Thanks

    CTB

  5. #5
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    How is dynamic content a problem? What are you putting there. You should still control the size of dynamic content or atleast control how it wraps. I have put tables that feed from data bases inside iframes before without a horizontal problem http://www.clanknights.vze.com has them all over the place, but soon I will not be using an iframe, but rather just have the layout included on every page and keep the login form and other page data in a code behind.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles