Good afternoon all,
I have a Java applet that I wish to embed on a website. I require that the applet be full-sized, i.e. it occupies 100% width and 100% height of the webpage.
There should be no scrollbars.
This is the code I currently have:
<!doctype html>
<html>
<body style="background:red; width:100%; height:100%; padding:0; margin:0; border:0;">
<applet code="HelloWorld.class" style="padding:0; margin:0; border:0; width:100%; height:100%;">
Your browser does not support the <code>applet</code> tag.
</applet>
<!-- the applet should cover the entire page, so even though the body is red, it should be covered by the applet -->
</body>
</html>
For some reason, it doesn’t work on FireFox and IE. In Chrome, the applet appears to be taller than the page itself and thus a vertical scrollbar is shown. How do we make the applet fill the exact size of the webpage, showing neither any horizontal scrollbars nor vertical scrollbars?
PS: if possible, a solution which works on a browser that has JavaScript disabled would be cool.
Another way…