boyfrom75
05-23-2012, 05:25 AM
What is the difference between this 2 codes.. The first code works fine for a full screen iframe and the other code too.. So why should I use the second code.? is there something special..? why the code is so long ? Is important to ad CSS in this page...? Is the CSS doing something special...? Im confused I dont see the difference...
First example
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></head><body bgcolor="#000000">
<iframe name='myiframe' id='myiframe' src='http://www.mywebsite.com'
style='position:absolute; top:0px; left:0px; width:100%; height:100%;
z-index:999' onload='sendParams();' frameborder='no'>
</iframe>
</body></html>
VS
Second example
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="EN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Full Screen Iframe</title>
<style type="text/css">
html
{
overflow: auto;
}
html, body, div, iframe
{
margin: 0px;
padding: 0px;
height: 100%;
border: none;
}
iframe
{
display: block;
width: 100%;
border: none;
overflow-y: auto;
overflow-x: hidden;
}
</style>
</head>
<body>
<iframe id="tree" name="myiframe" src="http://mywebsite.com" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" scrolling="auto"></iframe>
</body>
</html>
First example
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></head><body bgcolor="#000000">
<iframe name='myiframe' id='myiframe' src='http://www.mywebsite.com'
style='position:absolute; top:0px; left:0px; width:100%; height:100%;
z-index:999' onload='sendParams();' frameborder='no'>
</iframe>
</body></html>
VS
Second example
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="EN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Full Screen Iframe</title>
<style type="text/css">
html
{
overflow: auto;
}
html, body, div, iframe
{
margin: 0px;
padding: 0px;
height: 100%;
border: none;
}
iframe
{
display: block;
width: 100%;
border: none;
overflow-y: auto;
overflow-x: hidden;
}
</style>
</head>
<body>
<iframe id="tree" name="myiframe" src="http://mywebsite.com" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" scrolling="auto"></iframe>
</body>
</html>