ReportingAnalyst
MIS
Hi,
I built a tree dynamically using styled UL tags. It is nested. The code is a working sample to see that there is so much space between the manager and their subordinates. How can I reduce this space? Which property do I use to reduce the space?
Thanks.
I built a tree dynamically using styled UL tags. It is nested. The code is a working sample to see that there is so much space between the manager and their subordinates. How can I reduce this space? Which property do I use to reduce the space?
Thanks.
Code:
<html>
<body>
</body>
</html>
<HTML>
<HEAD>
<style type="text/css">
.ulcontent{
display:none;
}
#menu {
padding:0;
margin:0;
}
#menu li {
list-style-type:none;
}
#menu ul {
padding: 0;
margin: 6px;
list-style-type: none;
}
a.a_style:link {color:#0000ff; text-decoration:none;}
a.a_style:visited {color:#0000ff; text-decoration:none;}
a.a_style:hover {color:#ff0000; text-decoration:underline;}
a.a_style:hover {color:#ff0000; text-decoration:underline;}
</style>
<script type="text/javascript">
function s_Hide(el){
obj = document.getElementById(el).style;
(obj.display == 'none')? obj.display = 'block' : obj.display = 'none';
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Organization with styled Unordered Lists</TITLE>
</HEAD>
<BODY>
<form name="commissionReports" method=post>
<ul id="menu">
<li>
<input type="radio" checked name="empid" id="empid" value="22979">
<a href="#" class="a_style" onclick="s_Hide('1472'); return false;">TopMgr</a><font size=1>(22979)</font>
<ul id="1472" class="ulcontent">
<li>
<input type="radio" name="empid" id="empid" value="8208">
<a href="#" class="a_style" onclick="s_Hide('1703'); return false;">Mgr1</a><font size=1> (8208)</font>
<ul id="1703" class="ulcontent">
<li>
<input type="radio" name="empid" id="empid" value="40801">
Subordinate1 <font size=1>(40801)</font>
</li>
<li>
<input type="radio" name="empid" id="empid" value="8089">
<a href="#" class="a_style" onclick="s_Hide('3290'); return false;">Mgr2</a><font size=1> (8089)</font>
<ul id="3290" class="ulcontent">
<li>
<input type="radio" name="empid" id="empid" value="806">
Subordinate2 <font size=1>(806)</font>
</li>
</ul>
</li>
<li>
<input type="radio" name="empid" id="empid" value="82">
Subordinate4 <font size=1>(82)</font>
</li>
<li>
<input type="radio" name="empid" id="empid" value="26">
Subordinate5 <font size=1>(26)</font>
</li>
<li>
<input type="radio" name="empid" id="empid" value="80">
Subordinate6 <font size=1>(80)</font>
</li>
</ul>
</li>
<li>
<input type="radio" name="empid" id="empid" value="28">
Subordinate7 <font size=1>(28)</font>
</li>
<li>
<input type="radio" name="empid" id="empid" value="40">
<a href="#" class="a_style" onclick="s_Hide('2109922'); return false;">Mgr3</a><font size=1> (40)</font>
<ul id="2109922" class="ulcontent">
<li>
<input type="radio" name="empid" id="empid" value="41">
Subordinate8 <font size=1>(41)</font>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</form>
</body>
</html>