PDA

View Full Version : I Need Help Designing My Navigation!



x-a-x
21-11-2004, 06:29 PM
OK. I just about have everything down except javascript! I need the code and need help on how to make a navigation like the one on habbox.com. Like the way that you click the word and small sub links drop down. If you can help me at all please private message me or post a reply. Anything will help! ASAP. Thanks guys :p

smurf-you
23-11-2004, 10:06 PM
It isn't javascript it's a dropdown menu on html i haven't got the code but just search it in google or just do it on frontpage, Dreamweaver;)

Mentor
23-11-2004, 10:53 PM
Actaly ist part javascrip part html
http://thybag.co.uk/Nav.htm veiw teh sorse on that page, and take a look, with a bit of time you shoudl see what its doing, most of it is the css, otherwize its just a starnge blob. I would post the code, but my fire wall has a grudge agsit me so block any outgoing data if its to large, aka a long post, sorry i coulnt be of more help.
Btw that page also has an affilets i fraim and a javascript random affilet / lin kscript in case your wondeing what all that is

-JT-
23-11-2004, 11:04 PM
You will get a better DHTML one, there pretty cool. ww.google.co.uk is a good recource

Jseb
24-11-2004, 03:19 AM
Hmm i think i have what u need :)

Yeah i believe i have your code because for my site i used to! and u might have to modifie it a little bit but it is pretty simple!

<style>

<style type="text/css">
.menutitle{
cursor:pointer;
margin-bottom: 5px;
background-color:#ECECFF;
color:#000000;
width:140px;
padding:2px;
text-align:center;
font-weight:bold;
/*/*/border:1px solid #000000;/* */
}

.submenu{
margin-bottom: 0.5em;
}
.menutitle{
cursor:pointer;
margin-bottom: 2px;
background-color:none;
color:#000000;
width:140px;
text-align:left;
font-family:Arial;
font-weight:bold;
font-size:12px;
}

</style>

<script type="text/javascript">

if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
if(document.getElementById){
var el = document.getElementById(obj);
var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
if(el.style.display != "block"){ //DynamicDrive.com change
for (var i=0; i<ar.length; i++){
if (ar[i].className=="submenu") //DynamicDrive.com change
ar[i].style.display = "none";
}
el.style.display = "block";
}else{
el.style.display = "none";
}
}
}

</script>
</style>

This most be place at the top ! after html! I use also front page so it might be a little bit different :eusa_ange but same basic i believe!

This part is a exemple you must name few thing! and you have to edit a lots!

<div class="menutitle" onclick="SwitchMenu('sub1')"><b>

<font face="Verdana" size="1">Forum</font></b></div>

<span class="submenu" id="sub1">

<font size="1" color="#ECECFF">- </font>
<a target="_blank" href="http://s2.excoboard.com/exco/index.php?boardid=4960">

<font size="1" color="#ECECFF">Forum</font></a></span><br>
&nbsp;</div>

this is kinda the code you might just have to change it and edit it a little! in your own way and change everything you Know Also the navy color mean that you have to give your own Variable!

x-a-x
24-11-2004, 05:28 AM
I have fixed my problem. Thank you all very much

Want to hide these adverts? Register an account for free!