LI anklickbar? [Gelöst]

  • tobyte tobyte
    R2-D2
    0 x
    121 Beiträge
    0 Hilfreiche Beiträge
    10. 10. 2008, 21:52

    Evtl könnt ihr mir weiterhelfen. Auf meiner Seite http://www.tobraun.de befindet sich auf der linken Seite eine Navigation, welche ich über ein Text Menü bzw. LI gelöst habe

    [b]css:[/b]
    ul.navigation {padding:0; margin:0; list-style-type:none;}
    ul.navigation li { background-color:#505050; border-bottom:8px solid #fff; margin:0 0 10px 0; padding:10px 0 10px 15px; color:#fff; font-weight:bold;}
    ul.navigation li.act { background-color:#fff; border-bottom:8px solid #505050; color:#505050;}
    ul.navigation li:hover {background-color:#2e2e2e;}
    ul.navigation li.act:hover {background-color:#efefef;}

    ul.navigation li a {color:#fff; text-decoration:none;}
    ul.navigation li.act a {color:#505050;}

    wie kann ich es realisieren, dass die Navigation auf einen Klick auf der gesamten LI reagiert?


  • 1
  • just2b just2b
    TYPO3-Yoda
    0 x
    18741 Beiträge
    2 Hilfreiche Beiträge
    10. 10. 2008, 21:54

    ul.navigation li a {
    display:block
    }

    und das padding vom li ins a

    georg

  • tobyte tobyte
    R2-D2
    0 x
    121 Beiträge
    0 Hilfreiche Beiträge
    10. 10. 2008, 22:18

    danke erstmal für den Tipp, die Änderungen die ich vorgenommen habe:

    ul.navigation {padding:0; margin:0; list-style-type:none; display:block;}
    ul.navigation li a {color:#fff; text-decoration:none; padding:10px 80px 10px 0;}

    nun ist der Bereich, welcher anklickbar ist, größer geworden. Allerdings brechen jetzt lange Seitennamen, welche aus 2 Wörtern bestehen, ggf. um. Ich muss allerdngs gestehen, dass ich nicht genau weiss was du mit passing meinst, aber es wird wohl padding sein?

  • just2b just2b
    TYPO3-Yoda
    0 x
    18741 Beiträge
    2 Hilfreiche Beiträge
    10. 10. 2008, 22:36

    ja padding natürlich... habs im posting ausgebessert

    sonst schaus dir zB auf just2b.com an oder jeder anderer seite mit listenmenü

    georg

  • tobyte tobyte
    R2-D2
    0 x
    121 Beiträge
    0 Hilfreiche Beiträge
    10. 10. 2008, 22:44

    danke nohmal, nun ist es so wie es sein soll.

    css:
    ul.navigation {padding:0; margin:0; list-style-type:none;}
    ul.navigation li { background-color:#505050; border-bottom:8px solid #fff; margin:0 0 10px 0; color:#fff; font-weight:bold;}
    ul.navigation li.act { background-color:#fff; border-bottom:8px solid #505050; color:#505050;}
    ul.navigation li:hover {background-color:#2e2e2e;}
    ul.navigation li.act:hover {background-color:#efefef;}

    ul.navigation li a {color:#fff; text-decoration:none; padding:10px 80px 10px 15px; display:block;}
    ul.navigation li.act a {color:#505050;}

  • 1