In the following script, how do I get rid of the space between
the top div and the following div sections. I need to know what
to replace the <br> tag with where I stop the floats with “style=’clear:both'”
[code]
<html>
<head>
<title>Slide Tab Menu</title>
<script type=”text/javascript”>
var tabLevel = 0;
var maxLevel = 3;
function Slide(newLevel) {
for (var i=0; i<maxLevel; i++) {
document.getElementById(‘tab’+i).style.display = ‘none’;
}
tabLevel = tabLevel + newLevel;
if (tabLevel >= maxLevel) { tabLevel = maxLevel-1; }
if (tabLevel < 0) { tabLevel = 0; }
document.getElementById(‘tab’+tabLevel).style.display = ‘block’;
document.getElementById(‘infoLine’).innerHTML = ‘Information Line ‘+(tabLevel+1);
}
onload = function() {
Slide(0);
}
</script>
<style type=”text/css”>
.tab {
display:block;
width:250px;
height:100%;
background-color:#ffddbb;
color:#000000;
}
</style>
</head>
<body>
<div id=”main” style=”width:250px;height:300px;”>
<div style=”float:left;width:8%;
background-color:#ffddbb;text-align:center;color:#000000;
cursor:pointer;” onclick=”Slide(-1);”> <
</div>
<div id=”infoLine”
style=”float:left;width:83%;text-align:center;background-color:#ffddbb”></div>
<div style=”float:left;width:8%;
background-color:#ffddbb;text-align:center;color:#000000;
cursor:pointer;” onclick=”Slide(1);”> >
</div>
<!– div style=”clear:both;height:0px;width:0px”></div –>
<br style=”clear:both;”>
<div id=”tab0″ class=”tab”>
<ol>
<li>test</li>
<li>list</li>
<li>contents</li>
</ol>
</div>
<div id=”tab1″ class=”tab”>
<ul>
<li>test 1</li>
<li>list 1</li>
<li>contents 1</li>
</ul>
</div>
<div id=”tab2″ class=”tab”>
<ul style=”list-style-type:none”>
<li>test 2</li>
<li>list 2</li>
<li>contents 2</li>
</ul>
</div>
</div>
</body>
</html>
I’m trying to solve one problem at a time,
but my next question will be how to slide the tab body sections into and out of
the area below the top controlling <div> sections. All it does now is
simply hide or show the sections and I would like to create a sliding
illusion if possible. Any ideas on how to control this are appreciated.