Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Apr 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Iframes & Horizontal scrollbars even when overflow-x:hidden

    IE is beginning to piss me off? why can't they have just a horizontalscroll="off" thing in HTML. My pages look perfect in Firefox and Opera, but IE insists on putting a horizontal scrollbar in ANY page that has to scroll vertically. I've tried overflow-x:hidden and it didn't work in IE. I tried overflow-y:hidden just to see and it worked in Firefox and opera, but not in IE. I then tried overflow:hidden and IE didn't even accept that one.
    Anyway, it's really an aesthetic problem, but aesthetics are kinda important for an art website. Is there ANY way to over-ride IE and completely disable a horizontal scrollbar for a frame? PS I've tried putting that overflow code in the main page, the iframe's page, and even the iframe tag's style. On a side rant? How come Opera and Firefox can obey code so much easier than IE? Thanks in advance for any help. I browsed the forums already looking for answers to the question and found the question a few times but no answers that actually worked.

    This is what I've got right now that doesn't work:
    <td valign="top" width="628px" style="background-color:white "><iframe name="content" id="content" frameborder="0" src="news.htm" height="380px" width="628px" style="overflow-x:hidden ">&nbsp;</iframe></td>

  • #2
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The only thing you can really do is add scrolling="no" to the HTML of your iFrame. This will stop all scrollbars though.

  • #3
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,801
    Thanks
    8
    Thanked 131 Times in 129 Posts
    I think the real culprit maybe the page your loading into your Iframe. In the code you posted that would be 'news.htm'. What does the code of that page look like? Since your content Iframe is 628px wide, make any page being linked into the iframe no wider than 610px. You need to leave room for the vertical scroll bar. The iframe inner width is actually the width of the scroll bar (16-18px) + the width of the page being loaded into the iframe.
    Stop making things so hard on yourself.
    i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis

  • #4
    Regular Coder
    Join Date
    Jan 2005
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts
    this should work it dose for me
    Code:
     
    <td valign="top" width="628px" style="background-color:white ">
    <iframe name="Content" id="content" frameborder="0" src="news.htm" height="380" width="628">&nbsp;</iframe></td>
    make shure u have news.htm uploaded to your web or just do
    Code:
    <iframe src="news.htm" name="content" width="628" height="380" frameborder="0"></iframe>
    Last edited by armyman; 12-27-2005 at 08:29 PM.

  • #5
    New Coder
    Join Date
    Apr 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by harbingerOTV
    I think the real culprit maybe the page your loading into your Iframe. In the code you posted that would be 'news.htm'. What does the code of that page look like? Since your content Iframe is 628px wide, make any page being linked into the iframe no wider than 610px. You need to leave room for the vertical scroll bar. The iframe inner width is actually the width of the scroll bar (16-18px) + the width of the page being loaded into the iframe.
    How do I set the width of the page being linked? Can't say I've ever set a page width before... just the width of what the content is being contained in.
    and armyman... I don't see what you changed other than removing the style that tells it (theoretically and unsuccessfully) to not show a horizontal scrollbar. :-P

    As for what the news.htm looks like. it's got some pictures floated to the left alignment and has text left justified next to the images and I've even tried giving it a big right side margin... didn't do anything except give more white space on the right side while maintaining the horizontal scrollbar.

  • #6
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,801
    Thanks
    8
    Thanked 131 Times in 129 Posts
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>610px iframe page</title>
    <style type="text/css">
    * {
    padding: 0;
    margin: 0;
    }
    #container {
    width: 610px;
    background-color: #fc3;
    height: 1000px;
    }		
    </style>	
    </head>
    <body>
    <div id="container"></div>
    </body>
    </html>
    Try saving that as your news.htm file and see if you get a scrollbar in the Iframe.
    Stop making things so hard on yourself.
    i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis


  •  

    LinkBacks (?)

    1. 06-02-2014, 04:03 AM

    Posting Permissions

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