Navigationsleiste

  • ich habe ein großes Problem: Ich habe mit css eine schöne Navigationsleiste gemacht, wenn ich sie allerdings mit einem Untermenü versehen will, oder sie dynamisch machen will, klappt das nicht. Könnt ihr mir helfen?

  • Sorry, hab ich vergessen :lol:


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html>
    <head>
    <title>Untitled</title>
    </head>
    <body>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="de">
    <head>
    <meta http-equiv="content-type" content="text/html;
    charset=ISO-8859-1">
    <title>Navigationsleiste</title>
    <style type="text/css">
    body {
    background-color:
    background-image: hintergrund_m.gif;
    background-repeat:repeat-y;
    }

    #navigation {
    position:absolute;
    top:50px;
    left:0px;
    width:165px;
    }

    a.navi, a.navi_first, a.navi_self {
    display:block;
    white-space:nowrap;
    overflow:hidden;
    border-left:1px solid black;
    border-right:1px solid black;
    border-bottom:1px solid black;
    font-family:Verdana;
    font-size:14px;
    font-weight:bold;
    text-decoration:none;
    letter-spacing:0.1em;
    padding:16px;
    text-align:center;
    }

    a.navi_first {
    border-top:1px solid black;
    }

    a.navi:link, a.navi_first:link,
    a.navi:visited, a.navi_first:visited {
    background-color:red;
    color:white;
    }

    a.navi_self:link, a.navi_self:visited {
    background-color:red;
    color:white;
    }

    a.navi:hover, a.navi_first:hover, a.navi_self:hover,
    a.navi:active, a.navi_first:active, a.navi_self:active {
    background-color:gray;
    color:black;
    }
    </style>
    </head>
    <body>
    <div id="navigation">
    <a class="navi_self navi_first" href="start.php">
    STARTSEITE
    </a>
    <a class="navi" href="news.php" title="News">
    NEWS
    </a>
    <a class="navi" href="teams.php" title="Teams">
    AKTIVE
    </a>
    <a class="navi" href="alte_herren.php" title="Alte Herren">
    ALTE HERREN
    </a>
    <a class="navi" href="jugend.php" title="Jugend">
    JUGEND
    </a>
    <a class="navi" href="verein.php" title="Verein">
    VEREIN
    </a>
    <a class="navi" href="kontakt.php" title="Kontakt">
    KONTAKT
    </a>
    <a class="navi" href="impressum.php" title="Impressum">
    IMPRESSUM
    </a>

    </div>
    </body>
    </html>

    </body>
    </html>

  • ich möchte, dass die "Untermenüs" so rauskommen, wie hier an dem Beispiel von selfhtml.
    Ich bin leider blutiger Anfänger und weiß deshalb nicht, wie ich das bei meiner Navigationsleiste machen kan. HILFE!!


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    <title>Dynamisch Navigationsleisten einblenden</title>
    <style type="text/css">
    body, p a {
    font: normal 100.01% Helvetica, Arial, sans-serif;
    color: black; background-color: #ffffe0;
    }

    div#Rahmen {
    width: 47.1em;
    padding: 0.8em;
    border: 1px solid black;
    background-color: silver;
    }
    * html div#Rahmen { /* Korrektur fuer IE 5.x */
    width: 48.7em;
    w\idth: 47.1em;
    }
    div#Rahmen div {
    clear: left;
    }
    ul#Navigation {
    margin: 0; padding: 0;
    text-align: center;
    }

    ul#Navigation li {
    list-style: none;
    float: left; /* ohne width - nach CSS 2.1 erlaubt */
    position: relative;
    margin: 0.4em; padding: 0;
    }
    * html ul#Navigation li { /* Korrektur fuer den IE */
    margin-bottom: -0.4em;
    }

    ul#Navigation li ul {
    margin: 0; padding: 0;
    position: absolute;
    top: 1.6em; left: -0.4em;
    display: none; /* Unternavigation ausblenden */
    }
    * html ul#Navigation li ul { /* Korrektur fuer IE 5.x */
    left: -1.5em;
    lef\t: -0.4em;
    }
    ul#Navigation li:hover ul {
    display: block; /* Unternavigation in modernen Browsern einblenden */
    }
    ul#Navigation li ul li {
    float: none;
    display: block;
    margin-bottom: 0.2em;
    }

    ul#Navigation a, ul#Navigation span {
    display: block;
    width: 6.4em; /* Breite den in li enthaltenen Elementen zuweisen */
    padding: 0.2em 1em;
    text-decoration: none; font-weight: bold;
    border: 1px solid black;
    border-left-color: white; border-top-color: white;
    color: maroon; background-color: #ccc;
    }
    * html ul#Navigation a, * html ul#Navigation span {
    width: 8.6em; /* Breite nach altem MS-Boxmodell f&uuml;r IE 5.x */
    w\idth: 6.4em; /* korrekte Breite fuer den IE 6 im standardkompatiblen Modus */
    }
    ul#Navigation a:hover, ul#Navigation span, li a#aktuell {
    border-color: white;
    border-left-color: black; border-top-color: black;
    color: white; background-color: gray;
    }
    li a#aktuell { /* aktuelle Rubrik kennzeichnen */
    color: maroon; background-color: silver;
    }
    ul#Navigation li ul span { /* aktuelle Unterseite kennzeichnen */
    background-color: maroon;
    }

    </style>
    </head>
    <body>
    <h1 id="Beispiel">Dynamisch Navigationsleisten einblenden</h1>

    <div id="Rahmen"><ul id="Navigation">
    [*]Seite 1

    [*]Seite 2
    <ul>
    [*]Seite 2a
    [*]Seite 2b
    [/list]

    [*]Seite 3

    [*]Seite 4
    <ul>
    [*]Seite 4a
    [*]<span>aktuelle Seite</span>
    [*]Seite 4c

    [/list]

    [*]Seite 5
    [/list]<div></div></div>


    zur&uuml;ck</p>
    </body>
    </html>