erzengelsamael
Grünschnabel
Hy leutz,
ich benötige dringend hilfe!
Ich hab schon nen fertiges DropDown Menu, das auch richtig klasse t!
Jetzt iss nur die schwere frage, ich möchte das, wenn die seite geöffnet wird schon der erste Menu Punkt schon geöffnet ist haben, iss das machbar?
mein code iss,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>GotchaForest-Suhl</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
window.onload=montre;
function montre(id) {
var d = document.getElementById(id);
for (var i = 1; i<=10; i++) {
if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
}
if (d) {d.style.display='block';}
}
//-->
</script>
<style type="text/css">
<!--
body {
margin: 0;
padding: 0;
background: black;
font: 80% verdana, arial, sans-serif;
}
dl, dt, dd, ul, li {
margin: 0;
padding: 0;
list-style-type: none;
}
div.bg {
background-image: url(bg.png);
background-color:black;
width:750px;height:550px;
border:0px solid black;
padding:20px;
}
#menu {
position: absolute;
top: 143px;
left: 13px;
border: 0px solid gray;
background: #999999 url(#);
}
#menu {
width: 135px;
}
#menu dt {
cursor: pointer;
margin: 2px 2px;;
height: 20px;
line-height: 20px;
text-align: center;
font-weight: bold;
border: 1px solid gray;
background: #ccc url(heads.gif);
}
#menu dd {
border: 1px solid gray;
margin: 2px 2px;;
width: 129px;
}
#menu li {
text-align: left;
background: #fff;
margin: 1px 1px;;
width: 127px;
}
#menu li a, #menu dt a {
color: #000;
text-decoration: none;
display: block;
border: 0 none;
height: 100%;
}
#menu li a:hover, #menu dt a:hover {
background: #eee;
}
.mentions {
position: absolute;
top : 300px;
left : 10px;
color: #000;
background-color: #ddd;
}
-->
</style></head><body>
<div class="bg">
</div>
<dl id="menu">
<dt onclick="javascript:montre('smenu1');"><a href="#">Main</a></dt>
<dd style="display: none;" id="smenu1">
<ul>
<li><a href="index.htm"> - Home</a></li>
<li><a href="#"> - Preise</a></li>
<li><a href="#"> - Anmeldung</a></li>
<li><a href="#"> - Gutschein</a></li>
<li><a href="#"> - Special Events</a></li>
<li><a href="#"> - Kontakt</a></li>
<li><a href="#"> - Downloads</a></li>
</ul>
</dd>
<dt onclick="javascript:montre('smenu2');"><a href="#">Info's</a></dt>
<dd style="display: none;" id="smenu2">
<ul>
<li><a href="#"> - Wichtiges</a></li>
<li><a href="#"> - Was Euch<br>   erwartet</a></li>
<li><a href="#"> - Mitbringen</a></li>
<li><a href="#"> - Unterkunft</a></li>
<li><a href="#"> - Anfahrt</a></li>
<li><a href="#"> - Leihausrüstung</a></li>
<li><a href="#"> - Betriebsausflug</a></li>
<li><a href="#"> - Service</a></li>
<li><a href="#"> - Restaurant</a></li>
<li><a href="#"> - Die Regeln</a></li>
<li><a href="#"> - Die<br>   Spielvarianten</a></li>
<li><a href="#"> - Ist Gotcha<br>   Gefährlich?</a></li>
</ul>
</dd>
<dt onclick="javascript:montre('smenu3');"><a href="#">Community</a></dt>
<dd style="display: none;" id="smenu3">
<ul>
<li><a href="#"> - Gästebuch</a></li>
<li><a href="#"> - Forum</a></li>
<li><a href="#"> - Newsletter</a></li>
<li><a href="#"> - Bannertausch</a></li>
</ul>
</dd>
<dt onclick="javascript:montre('smenu4');">Besucher</dt>
<dd>
<ul>
<li> - Besucher:</li>
<li> - Heute:</li>
<li> - Online:</li>
</ul>
</dd>
</dl>
</body></html>
Schon mal danke vorraus!
ich benötige dringend hilfe!
Ich hab schon nen fertiges DropDown Menu, das auch richtig klasse t!
Jetzt iss nur die schwere frage, ich möchte das, wenn die seite geöffnet wird schon der erste Menu Punkt schon geöffnet ist haben, iss das machbar?
mein code iss,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>GotchaForest-Suhl</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
window.onload=montre;
function montre(id) {
var d = document.getElementById(id);
for (var i = 1; i<=10; i++) {
if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
}
if (d) {d.style.display='block';}
}
//-->
</script>
<style type="text/css">
<!--
body {
margin: 0;
padding: 0;
background: black;
font: 80% verdana, arial, sans-serif;
}
dl, dt, dd, ul, li {
margin: 0;
padding: 0;
list-style-type: none;
}
div.bg {
background-image: url(bg.png);
background-color:black;
width:750px;height:550px;
border:0px solid black;
padding:20px;
}
#menu {
position: absolute;
top: 143px;
left: 13px;
border: 0px solid gray;
background: #999999 url(#);
}
#menu {
width: 135px;
}
#menu dt {
cursor: pointer;
margin: 2px 2px;;
height: 20px;
line-height: 20px;
text-align: center;
font-weight: bold;
border: 1px solid gray;
background: #ccc url(heads.gif);
}
#menu dd {
border: 1px solid gray;
margin: 2px 2px;;
width: 129px;
}
#menu li {
text-align: left;
background: #fff;
margin: 1px 1px;;
width: 127px;
}
#menu li a, #menu dt a {
color: #000;
text-decoration: none;
display: block;
border: 0 none;
height: 100%;
}
#menu li a:hover, #menu dt a:hover {
background: #eee;
}
.mentions {
position: absolute;
top : 300px;
left : 10px;
color: #000;
background-color: #ddd;
}
-->
</style></head><body>
<div class="bg">
</div>
<dl id="menu">
<dt onclick="javascript:montre('smenu1');"><a href="#">Main</a></dt>
<dd style="display: none;" id="smenu1">
<ul>
<li><a href="index.htm"> - Home</a></li>
<li><a href="#"> - Preise</a></li>
<li><a href="#"> - Anmeldung</a></li>
<li><a href="#"> - Gutschein</a></li>
<li><a href="#"> - Special Events</a></li>
<li><a href="#"> - Kontakt</a></li>
<li><a href="#"> - Downloads</a></li>
</ul>
</dd>
<dt onclick="javascript:montre('smenu2');"><a href="#">Info's</a></dt>
<dd style="display: none;" id="smenu2">
<ul>
<li><a href="#"> - Wichtiges</a></li>
<li><a href="#"> - Was Euch<br>   erwartet</a></li>
<li><a href="#"> - Mitbringen</a></li>
<li><a href="#"> - Unterkunft</a></li>
<li><a href="#"> - Anfahrt</a></li>
<li><a href="#"> - Leihausrüstung</a></li>
<li><a href="#"> - Betriebsausflug</a></li>
<li><a href="#"> - Service</a></li>
<li><a href="#"> - Restaurant</a></li>
<li><a href="#"> - Die Regeln</a></li>
<li><a href="#"> - Die<br>   Spielvarianten</a></li>
<li><a href="#"> - Ist Gotcha<br>   Gefährlich?</a></li>
</ul>
</dd>
<dt onclick="javascript:montre('smenu3');"><a href="#">Community</a></dt>
<dd style="display: none;" id="smenu3">
<ul>
<li><a href="#"> - Gästebuch</a></li>
<li><a href="#"> - Forum</a></li>
<li><a href="#"> - Newsletter</a></li>
<li><a href="#"> - Bannertausch</a></li>
</ul>
</dd>
<dt onclick="javascript:montre('smenu4');">Besucher</dt>
<dd>
<ul>
<li> - Besucher:</li>
<li> - Heute:</li>
<li> - Online:</li>
</ul>
</dd>
</dl>
</body></html>
Schon mal danke vorraus!