Suche im Forum:
Suchen


Autor Nachricht
Beitrag17.07.2009 um 17:01 (UTC)    
Titel: code falsch? bitte info DANKE

Diesen Code hab ich vom Forum, er funktioniert auch super, genau wie ich es brauche, nur würde ich gerne so machen, das da nur die 3 Buttons sind und man auf die draufklicken kann und dann zu nen Bild weitergeleitet wird und nicht das wenn man auf den button fährt, weitere punkte aufleuchten.

Wäre das möglich? Hab im forum dazu leider nix gefunden Sad

<style type="text/css" media="screen">
<!--
body
{
font-family: Arial, sans-serif;
font-size: 11px;
overflow: auto;
padding: 13px;
margin: 0px;
}

ul, li
{
list-style-type: none;
padding: 0px;
margin: 0px;
}

div.menu
{
position: absolute;
z-index: 3;
top: 230px;
left: 10%;
margin-left:-200px;
width: 100%;
}

.menu li
{
width: 350px;
float: left;
}

.menu a
{
border: 1px solid #F2F2F2;
background-color:#000000;
padding-top: 9px;
text-decoration: none;
text-align: center;
font-weight: bold;
cursor: pointer;
margin: 0px 10px;
display: block;
height: 25px;
color: #FFFFFF;
}

.menu a:hover
{
background-color: #000C32;
}

#smenu1, #smenu2, #smenu3
{
font-size: 13px;
display: none;
width: 200px;
float: left;
}

#smenu1 a, #smenu2 a, #smenu3 a
{
font-size: 13px;
font-weight: bold;
padding-top: 9px;
border-top: 0px;
cursor: pointer;
}
//-->

</style>

<script type="text/javascript">
<!--
function montre(id)
{
with (document)
{
if (getElementById)
getElementById(id).style.display = 'block';
else if (all)
all[id].style.display = 'block';
else
layers[id].display = 'block';
}
}

function cache(id)
{
with (document)
{
if (getElementById)
getElementById(id).style.display = 'none';
else if (all)
all[id].style.display = 'none';
else
layers[id].display = 'none';
}
}
//-->
</script>

<div class="menu">
<li><a href="javascript:void(0);" onmouseover="montre('smenu1');" onmouseout="cache('smenu1');">Spinnenfreak 1</a>
<ul id="smenu1" onmouseover="montre('smenu1');" onmouseout="cache('smenu1');">
<li><a href="Hier die Seite" target="_self">Foto</a></li>
</ul>
</li>

<li><a href="javascript:void(0);" onmouseover="montre('smenu2');" onmouseout="cache('smenu2');">Spinnenfreak 2</a>
<ul id="smenu2" onmouseover="montre('smenu2');" onmouseout="cache('smenu2');">
<li><a href="Hier die Seite" target="_self">Foto</a></li>
</ul>
</li>

<li><a href="javascript:void(0);" onmouseover="montre('smenu3');" onmouseout="cache('smenu3');">Spinnenfreak 3</a>
<ul id="smenu3" onmouseover="montre('smenu3');" onmouseout="cache('smenu3');">
<li><a href="Hier die Seite" target="_self">Foto</a></li>
</ul>
</li>
</ul>
</div>
Beitrag28.07.2009 um 07:44 (UTC)    
Titel:

Hi, wenn ich es richtig verstanden habe, dann willst du die Unterpunkte entfernen. Das geht so:


Einfach diese Teile aus dem Code entfernen:

Zitat:
<ul id="smenu1" onmouseover="montre('smenu1');" onmouseout="cache('smenu1');">
<li><a href="Hier die Seite" target="_self">Foto</a></li>
</ul>


Zitat:
<ul id="smenu2" onmouseover="montre('smenu2');" onmouseout="cache('smenu2');">
<li><a href="Hier die Seite" target="_self">Foto</a></li>
</ul>


Zitat:
<ul id="smenu3" onmouseover="montre('smenu3');" onmouseout="cache('smenu3');">
<li><a href="Hier die Seite" target="_self">Foto</a></li>
</ul>


Wenn du die Entfernt hast, dann sieht dein Code so aus:

Zitat:
<style type="text/css" media="screen">
<!--
body
{
font-family: Arial, sans-serif;
font-size: 11px;
overflow: auto;
padding: 13px;
margin: 0px;
}

ul, li
{
list-style-type: none;
padding: 0px;
margin: 0px;
}

div.menu
{
position: absolute;
z-index: 3;
top: 230px;
left: 10%;
margin-left:-200px;
width: 100%;
}

.menu li
{
width: 350px;
float: left;
}

.menu a
{
border: 1px solid #F2F2F2;
background-color:#000000;
padding-top: 9px;
text-decoration: none;
text-align: center;
font-weight: bold;
cursor: pointer;
margin: 0px 10px;
display: block;
height: 25px;
color: #FFFFFF;
}

.menu a:hover
{
background-color: #000C32;
}

#smenu1, #smenu2, #smenu3
{
font-size: 13px;
display: none;
width: 200px;
float: left;
}

#smenu1 a, #smenu2 a, #smenu3 a
{
font-size: 13px;
font-weight: bold;
padding-top: 9px;
border-top: 0px;
cursor: pointer;
}
//-->

</style>

<script type="text/javascript">
<!--
function montre(id)
{
with (document)
{
if (getElementById)
getElementById(id).style.display = 'block';
else if (all)
all[id].style.display = 'block';
else
layers[id].display = 'block';
}
}

function cache(id)
{
with (document)
{
if (getElementById)
getElementById(id).style.display = 'none';
else if (all)
all[id].style.display = 'none';
else
layers[id].display = 'none';
}
}
//-->
</script>

<div class="menu">
<li><a href="javascript:void(0);" onmouseover="montre('smenu1');" onmouseout="cache('smenu1');">Spinnenfreak 1</a>

</li>

<li><a href="javascript:void(0);" onmouseover="montre('smenu2');" onmouseout="cache('smenu2');">Spinnenfreak 2</a>

</li>

<li><a href="javascript:void(0);" onmouseover="montre('smenu3');" onmouseout="cache('smenu3');">Spinnenfreak 3</a>

</li>
</ul>
</div>


So, und jetzt erscheinen die Unterpunkte nicht mehr auf deiner Seite. Wink
______________
Beiträge der letzten Zeit anzeigen:   


Powered by phpBB © 2001, 2005 phpBB Group
Deutsche Übersetzung von phpBB.de