0

I am trying to build a full page ad like those from Adbrite with jQuery.

It's simply an iframe with 100% width and height but my main problem is that the full page ad is shown in a website that has a vertical scrollbar, so if the iframe ad also has a scrollbar then two scrollbars are visible and it looks bad.

How could I solve that? or is there some already made code to do it?

user979390
  • 309
  • 2
  • 4
  • 16
  • This is already answered in http://stackoverflow.com/questions/1691873/safari-chrome-webkit-cannot-hide-iframe-vertical-scrollbar – hafichuk Oct 29 '11 at 02:04
  • I don't want to hide the iframe scrollbar, if I am going to hide one in any case would be the one from the main page, if I hide the one in the iframe how is the user supposed to watch the entire advertised website? – user979390 Oct 29 '11 at 02:31

1 Answers1

1

Try adding this at the top of the parent page or the equivalent in your css file if you're using one.

<STYLE TYPE="text/css"> 
<!-- 
* {
  margin: 0;
  padding: 0;
}
body {overflow: hidden};
--> 
</STYLE> 

The overflow:hidden should remove any scrollbars.

The other part should allow the iframe to use the full width/height of the browser.

hafichuk
  • 10,351
  • 10
  • 38
  • 53