Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" lang="EN">
  3. <head>
  4. <style type="text/css">
  5. html
  6. {
  7. overflow: auto;
  8. }
  9.  
  10. html, body, div, iframe
  11. {
  12. margin: 0px;
  13. padding: 0px;
  14. height: 100%;
  15. border: none;
  16. }
  17.  
  18. iframe
  19. {
  20. display: block;
  21. width: 100%;
  22. border: none;
  23. overflow-y: auto;
  24. overflow-x: hidden;
  25. }
  26. </style>
  27. </head>
  28. <body>
  29.  
  30. <iframe id="tree" name="myiframe" src="http://www.your_page.com/" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" scrolling="auto"></iframe>
  31.  
  32. </body>
  33. </html>
  34.  
  35. <script type="Text/JavaScript" language="JavaScript">
  36. <!--
  37. function resize_iframe()
  38. {
  39. var height=window.innerWidth;//Firefox
  40. if (document.body.clientHeight)
  41. {
  42. height=document.body.clientHeight;//IE
  43. }
  44. //resize the iframe according to the size of the
  45. //window (all these should be on the same line)
  46. document.getElementById("cam").style.height=parseInt(height-
  47. document.getElementById("cam").offsetTop-8)+"px";
  48. }
  49.  
  50. // this will resize the iframe every
  51. // time you change the size of the window.
  52. window.onresize=resize_iframe;
  53.  
  54. //Instead of using this you can use:
  55. // <BODY onresize="resize_iframe()">
  56.  
  57. </script>
  58. </head>
  59. <body>
  60. <iframe id="cam" width="100%" scrolling="yes" src="http://www.your_page.com" onload="resize_iframe()">
  61. </iframe>
  62. </body>
  63.  
  64. <div id="overlay"></div>
  65.  
  66. #overlay
  67. {
  68.  
  69. position:fixed;
  70. top:0;
  71. left:0;
  72. bottom:0;
  73. right:0;
  74. height: 100%;
  75. width: 100%;
  76. margin: 0;
  77. padding: 0;
  78. background: #000000;
  79. opacity: .3;
  80. filter: alpha(opacity=30);
  81. -moz-opacity: .3;
  82. z-index: 101;
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement