Click to See Complete Forum and Search --> : Removing Header


akya
02-17-2006, 12:12 AM
I am writing a page in html that is basically made up of a table that is 100% height and width. it consists of 3 rows
top row:header pic/page name(138 pixels high)
middle row:links(12 pixels high)
bottom row:an IFrame that all the links in the middle row are targeted to.

my question is, i want to add a link to the middle row that allows you to remove the header(ie make the contents of the iframe go full screen) anyway to do this? i know i can set a target of _top, but how do i detect the current location of the iframe(to know what to set to full screen).

the tree
02-17-2006, 07:30 AM
I'm afraid that'll take javascript.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Page Title</title>
<style type="text/css">
<!--
body{
margin: 0;
padding: 0;
}
h1.show{
margin: 0;
padding: 10px;
height: 138px;
text-align: center;
background-color: #999;
}
h1.dontshow{
display: none;
}
div#navigation{
height: 12px;
}
iframe{
width: 100%;
height: 300px;
}
-->
</style>
<script type="text/javascript">
<!--
function change(ele){
if (document.getElementById(ele).className=="show")
{document.getElementById(ele).className="dontshow";}
else{document.getElementById(ele).className="show";}
}
//-->
</script>
</head>
<body>
<h1 id="title" class="show">Page title</h1>
<div id="navigation">I guess lot's of links are going here. Isn't that great. <button onclick="change('title');;">title</button></div>
<iframe src="http://google.com"></iframe>
</body>
</html>
Why tables for layout is stupid (http://hotdesign.com/seybold/) Why avoiding tables (for layout) is important (http://davespicks.com/essays/notables.html) Tables or CSS: choosing a layout (http://evolt.org/article/Tables_or_CSS_Choosing_a_layout/25/21429/) Why go table free? (http://www.workingwith.me.uk/tablefree/why/) Tables vs. CSS: A fight to the death (http://www.sitepoint.com/article/tables-vs-css/) Why Tables Are Bad (For Layout) Compared to Semantic HTML + CSS (http://www.phrogz.net/CSS/WhyTablesAreBadForLayout.html) The layout is dead, long live the layout (http://www.westciv.com/style_master/house/good_oil/dead_layout/)