Software Archive
Read-only legacy content
17061 Discussions

How to remove the scrollbar on Iframe

Duilio_P_
Beginner
850 Views

I want to remove this scrollbar iframe screen. Look the image.remove_scroolbar_xdk_iframe.jpg

0 Kudos
5 Replies
Barry_Johnson
New Contributor I
850 Views

So you have a full screen page which contains a full-screen <iframe>, is that correct? Does it behave correctly on the device or is it the same.

You could see if the "seamless" property for iframe is supported (support for it is weak). Regardless you should be able to set the overflow-x or overflow-y styles for the iframe to "hidden" and you would lose the relevant (x or y axis) scrollbar.

0 Kudos
Anusha_M_Intel1
Employee
850 Views

Try adding the property scrolling="no" to the iframe HTML tag.

<iframe scrolling="no" src="..." >
0 Kudos
Barry_Johnson
New Contributor I
850 Views

@Anusha - the "scrolling" attribute is not supported in HTML5. CSS styling is recommended.

Please see: http://www.w3.org/TR/html5-diff/#obsolete-attributes

This is not to deny that scrolling="no" may work in containers, but it seems preferable to build to standards for better cross-platform and forward compatibility.

BTW note that my earlier comment on "seamless" - it is actually universally unsupported. I'm now curious to even find out who sponsored it getting in the standard if no one supports it. http://caniuse.com/#feat=iframe-seamless

0 Kudos
leonardo_s_1
Beginner
850 Views

Hello, im working with construct2 and i export my projetc in html5 to intel xdk, i have the same problem with the scroll bar, how to remove that function, it scroll all my app outside the screen.

0 Kudos
PaulF_IntelCorp
Employee
850 Views

Leonardo -- do not use the Emulate tab as a guide for how your app will appear on a real device, this tab DOES NOT represent real device behavior! Build your app with Crosswalk and install it on an Android device to see the real behavior (or use the Debug tab, as it also uses Crosswalk to render your app). Do not build the standard "Android" app if you are creating a Construct2 game. The reason Scirra recommends you use the XDK is because it provides easy access to Crosswalk, which is necessary to get consistent behavior across all Android devices. 

The Emulate tab DOES NOT "emulate" real devices! It is meant for quick and easy logic debugging, not for precise "how will it look" or behave on a real device evaluation.

0 Kudos
Reply