• Das Erstellen neuer Accounts wurde ausgesetzt. Bei berechtigtem Interesse bitte Kontaktaufnahme über die üblichen Wege. Beste Grüße der Admin

Kontex Menü???

Schneider

New member
Hi @ all

Ich hätte wieder mal ne Frage und zwar ist es möglich mit CSS ein Kontext menü zu machen ich hab schon ein Java-Script gefunden mit dem es geht allerdings wäre mir lieber wenn es mit CSS gehen würde

Wäre für jeden Tipp dankbar

thx im Voraus
gruß Schneider
 
Hi,
was genau meinst Du mit einem Kontexmenü?
Beschreibe das mal bitte, bevor Mißverständnisse entstehen.
 
also wenn ich einen rechtsklick mache will ich das ein Kontextmenü aufgeht (wie in jedem exploer) nur will ich dann einfach einen link haben zum Bespiel Home und dann soll er auf die Home.html verlinken also nix spektakuleres
 
Moin!

CSS reagiert nicht auf Klicks - weder rechts noch links.

Ahoi - Pit
 
ok danke mal für die Infos wie kann man es sonst machen kann man es irgendwie als hoover machen das man zB das bil hat und wenn man dann drüber fährt das dann ein Menü aufgeht (wie bei Windows wenn man über ein Bild fährt das oben links eine leiste kommt mit Bild speicher ... )
 
Schneider schrieb:
ok danke mal für die Infos wie kann man es sonst machen kann man es irgendwie als hoover machen das man zB das bil hat und wenn man dann drüber fährt das dann ein Menü aufgeht (wie bei Windows wenn man über ein Bild fährt das oben links eine leiste kommt mit Bild speicher ... )
Prinzipiell schon - bei den Geckos und Opera, bei IE geht das nicht.
Der IE wendet das :hover ausschließlich auf das a-Tag an.
Und alles was man im Netz findet benutzt Hacks und Krücken,
das heisst, entweder zerschiesst es einem das Layout,
der Quellcode ist nicht valide oder es ist ein Fitzelchen JS dabei.
Da kannst Du es gleich mit JS machen...

Aber hier hast Du mal ein kleines Beispiel:
Code:
<html>
<head><title>CSS Cascading Stylesheets: Infobox - Beispiel 1</title>

<style type="text/css">
<!--
body {
 padding-top:130px;
}

#box {
 color:black;
 background-color:transparent;
 position:absolute; 
 top:100px; 
 left:30px; 
 z-index:1;
}

#box a {
 color:#f6e4c1;
 background-color:#b8ab8f;
 font-family:arial, sans-serif;
 font-size:100%;
 font-weight:bold;
 text-decoration:none;
 display:block;
 padding:5px;
 border-top:2px solid #e4d9c0;
 border-right:2px solid #837c6b;
 border-bottom:2px solid #837c6b;
 border-left:2px solid #e4d9c0;
}

#box a:visited {
 color:#f6e4c1;
 background-color:#b8ab8f;
}

#box a:hover {
 color:#f6e4c1;
 background-color:#b8ab8f;
 text-decoration:none;
 width:400px;
 border-top:2px solid #837c6b;
 border-right:2px solid #e4d9c0;
 border-bottom:2px solid #e4d9c0;
 border-left:2px solid #837c6b;
}

#box a:active {
 color:#f6e4c1;
 background-color:#b8ab8f;
}

#box a .info {
 display:none;
}

#box a:hover .info {
 color:black; 
 background:#b8ab8f;
 font:14px courier,sans-serif;
 display:block;
 padding:5px;
 text-align:justify;
}
-->
</style></head>

<body>

<div id="box">
 <a href="#">Infobox <span class="info">Inhalt der Infobox: Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
 diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis
 nostrud exercitation ulliam corper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem veleum iriure
 dolor in hendrerit in vulputate velit esse molestie consequat, vel willum lunombro dolore eu feugiat nulla facilisis at
 vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait
 nulla facilisi</span></a>
</div>

<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna
aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exercitation ulliam corper suscipit lobortis nisl ut aliquip
ex ea commodo consequat.Duis autem veleum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel willum
lunombro dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril
delenit augue duis dolore te feugait nulla facilisi</p>

</body></html>
 
Zuletzt bearbeitet:
Zurück
Oben