Web Analytics Made Easy -
StatCounter How to remove the iFrame scrollbars - CodingForum

Announcement

Collapse
No announcement yet.

How to remove the iFrame scrollbars

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to remove the iFrame scrollbars

    Hi,

    I wonder why the following iFrame has scrollbars:

    Code:
    <iframe width='600' height='200' frameborder='0' scrolling='no' src='https://docs.google.com/spreadsheet/pub?hl=en_US&key=0Aliqp0kGPjWsdERacHFDVzNzb1N3RHREZzYwVGQ5OVE&output=html&widget=true&chrome=false'></iframe>
    Thanks in advance!
    Mike
    HTML Editor: online HTML editor with real-time preview

  • #2
    The scroll bars that you were getting didn't come from iframe, but it was inside of the iframe. In the url if you set widget to false, it should go away.

    Code:
    <iframe width='600' height='200' frameborder='0' scrolling='no' src='https://docs.google.com/spreadsheet/pub?hl=en_US&key=0Aliqp0kGPjWsdERacHFDVzNzb1N3RHREZzYwVGQ5OVE&output=html&widget=false&chrome=false'></iframe>

    Comment


    • #3
      Originally posted by ASTP001 View Post
      In the url if you set widget to false, it should go away.
      Thanks for the answer, but the result will be different from what I expect as it removes the spreadsheet footer too.
      HTML Editor: online HTML editor with real-time preview

      Comment


      • #4
        Hi there Rain Lover,

        if you don't want scrollbars then you will have to change the iframe width and height attributes.

        So...
        Code:
        <iframe width='800' height='254'...
        ...instead of...
        Code:
        <iframe width='600' height='200'...
        coothead
        ~ the original bald headed old fart ~

        Comment


        • #5
          Originally posted by coothead View Post
          Hi there Rain Lover,

          if you don't want scrollbars then you will have to change the iframe width and height attributes.
          Dear coothead,

          Yes it seems obvious, but the questions is why there are scrollbars although I set the scrolling attribute to 'no'.
          HTML Editor: online HTML editor with real-time preview

          Comment


          • #6
            Hi there Rain Lover,

            I looked at the code again today, but strangely could not see the scrollbars that I saw yesterday.

            I tested this code in IE9, Firefox 6, Safari 5 and Opera 11...
            Code:
            
            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
               "http://www.w3.org/TR/html4/loose.dtd">
            <html lang="en">
            <head>
            
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            <meta name="language" content="english"> 
            <meta http-equiv="Content-Style-Type" content="text/css">
            
            <title></title>
            
            </head>
            <body>
            
            <div>
            <iframe width="600" height="200" frameborder="0" scrolling="no" 
            src="https://docs.google.com/spreadsheet/pub?hl=en_US&amp;key=0Aliqp0kGPjWsdERacHFDVzNzb1N3RHREZzYwVGQ5OVE&amp;output=html&amp;widget=false&amp;chrome=false">
            </iframe>
            
            </div>
            </body>
            </html>
            
            coothead
            ~ the original bald headed old fart ~

            Comment


            • #7
              Originally posted by coothead View Post
              Hi there Rain Lover,

              I looked at the code again today, but strangely could not see the scrollbars that I saw yesterday.
              That's because in your tests you've changed the URL parameter widget value to false. It removes the tabs on the spreadsheet footer.
              HTML Editor: online HTML editor with real-time preview

              Comment


              • #8
                Hi there Rain Lover,

                I did not change "the URL parameter widget value to false".

                I just copied the code that you provided.

                coothead
                ~ the original bald headed old fart ~

                Comment


                • #9
                  Maybe my eyes are too tired, but...

                  Originally posted by coothead View Post
                  Hi there Rain Lover,
                  I just copied the code that you provided.
                  Here's my code iframe source:
                  https://docs.google.com/spreadsheet/...E&output=html&widget=true&chrome=false

                  And here's the one I see in your code:
                  https://docs.google.com/spreadsheet/...tput=html&amp;widget=false&amp;chrome=false
                  HTML Editor: online HTML editor with real-time preview

                  Comment


                  • #10
                    Hi there Rain Lover,

                    Sorry, but I may have done you an injustice.

                    It seems that I copied ASTP001,s code by mistake.

                    coothead
                    ~ the original bald headed old fart ~

                    Comment


                    • #11
                      Hi there Rain Lover,

                      the scrollbars that you see do not belong to the iframe element but to the iframe content.

                      You can prove this to yourself by setting the scrolling attribute to "yes".

                      coothead
                      ~ the original bald headed old fart ~

                      Comment

                      Working...
                      X