SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict mcrumlish's Avatar
    Join Date
    Jan 2002
    Posts
    384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    horizontal scroll problem in an iframe

    Hi,

    I have a problem where an iframe is displaying a horizontal scroll when it should not be.

    I have set up 2 test files to illustrate the problem

    PHP Code:
    <!-- file 1 iframe.html-->
    <
    html>
    <
    head>
    <
    title>Untitled Document</title>
    <
    style type="text/css">
    <!--
    body {
        
    margin-left0px;
        
    margin-top0px;
        
    margin-right0px;
        
    margin-bottom0px;
    }
    -->
    </
    style></head>

    <
    body><iframe src="test.html" name="test" width="754" marginwidth="0" height="1000" marginheight="0" align="middle" scrolling="auto" frameborder="0"></iframe>
    </
    body>
    </
    html
    PHP Code:
    <!-- file 2 test.html -->
    <
    html>
    <
    head>
    <
    title>Untitled Document</title>
    <
    style type="text/css">
    <!--
    body {
        
    margin-left0px;
        
    margin-top0px;
        
    margin-right0px;
        
    margin-bottom0px;
    }
    -->
    </
    style></head>

    <
    body>
    <
    p>a</p>
    <
    p>&nbsp;</p>
    <
    p>a</p>
    <
    p>&nbsp;</p>
    <
    p>a</p>
    <
    p>&nbsp;</p>
    <
    p>a</p>
    <
    p>&nbsp;</p>
    <
    p>a</p>
    <
    p>&nbsp;</p>
    <
    p>a</p>
    <
    p>&nbsp;</p>
    <
    p>a</p>
    <
    p>a</p>
    <
    p>a</p>
    <
    p>a</p>
    <
    p>a</p>
    <
    p>a</p>
    <
    p>a</p>
    <
    p>a</p>
    <
    p>&nbsp;</p>
    <
    p>a</p>
    <
    p>a</p>
    <
    p>a</p>
    <
    p>a</p>
    <
    p>a</p>
    <
    p>a</p>
    <
    p>a</p>
    <
    p></p>
    </
    body>
    </
    html
    You can see above that the 2nd file has no content that requires a horizontal scroll so can anyone work out why it is still appearing as a scroll in the iframe?

    Thanks in advance,
    Martin

  2. #2
    Free your mind Toly's Avatar
    Join Date
    Sep 2001
    Location
    Panama
    Posts
    2,182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tested your files on IE and Firefox, and didn't get an horizontal scroll bar.

    You can stop scrolling by changing scrolling="no", but that of course will stop vertical scrolling as well.
    Community Guidelines | Community FAQ

    "He that is kind is free, though he is a slave;
    he that is evil is a slave, though he be a king." - St. Augustine

  3. #3
    SitePoint Addict mcrumlish's Avatar
    Join Date
    Jan 2002
    Posts
    384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thats strange...I have attached a screenshot of what I am getting
    Attached Images Attached Images

  4. #4
    Free your mind Toly's Avatar
    Join Date
    Sep 2001
    Location
    Panama
    Posts
    2,182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tested again on a different computer and didn't get the horizontal scroll bar.

    Have you tried with different browsers?
    Community Guidelines | Community FAQ

    "He that is kind is free, though he is a slave;
    he that is evil is a slave, though he be a king." - St. Augustine


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
  •