Jump to content

Full Window Iframe With No Scrollbars


SandySynaptik
 Share

Recommended Posts

You want an iframe to just take up the whole window? Are you trying to display somebody else's website?You could make a frameset instead:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"><html><frameset cols="100%">  <frame src="URL" frameborder="0" scrolling="no"></frameset></html>

If you really think you need an iframe, make sure that you use CSS to reset margins and padding, and give the <html>, <body> and <iframe> element 100% width and height:

html,body {  margin: 0;  padding: 0;  width: 100%;  height: 100%;}iframe {  width: 100%;  height: 100%;}

In the iframe code, set the frameborder and scrolling attributes:

<iframe src="URL" frameborder="0" scrolling="no">

Link to comment
Share on other sites

The scrollbar isn't inside the iframe, it's outside.Since the <iframe> is inline (iframe standa for inline frame) it has a tiny space below it for text. You can set the display property to "block".

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...