kein link aber warum? css

Dieses Thema im Forum "Webentwicklung" wurde erstellt von Bitch, 16. März 2007 .

Schlagworte:
  1. 16. März 2007
    Ich bekomme es net hin das sich meine buttons als links benutezn lassen beziehungsweiße wenn ich es so mache :

    Code:
    <div id="container">
     
     <div id="main">
     <div id="header">
     <img src=./bilder/logo_versuch3.jpg>
     <!--header--></div>
     <div id="menue">
     <a class="button">Startseite</a> 
     <a class="button">Produkte</a> 
     <a class="button"><a href="histo.html">Unternehmen</a></a> 
     <a class="button">Kontakt</a> 
     <!--menue--></div>
     <div id="content">
     <!--content--></div>
     <div id="footer">
    
    wird meine klasse net mehr richtig angezeigt.

    Code:
    * {
    margin: 0;
    padding: 0;
    } 
    body {
     font-family:Verdana, Arial, sans-serif; 
     font-size: 14px;
     text-decoration: none;
     font-weight: bold;
     color: #784c24;
     background-color:#eee2cc;
     text-align:center;
     cursor: default;
    }
    a:link{
    color:#784c24;
    text-decoration:none;
    }
    a:visited{
    color:#784c24;
    text-decoration:none;
    }
    a:active{
    color:#784c24;
    text-decoration:none;
    }
    a:hover{
    color:#784c24;
    text-decoration:underline overline;
    }
    #main{
    margin:8px auto;
    border:1px dotted #be882e;
    background-color:#e9d9bb;
    width: 800px;
    }
    #header{
    border-bottom:1px dotted #be882e;
    background-color:#e9d9bb;
    width: 800px;
    height: 135px;
    }
    #menue{
    border-bottom:1px dotted #be882e;
    background-color:#e9d9bb;
    width: 800px;
    padding-top: 4px;
    padding-bottom: 4px;
    }
    a.button{
    padding: 1px;
    padding-left: 2px;
    padding-right: 2px;
    width:8em;
    height: 17px;
    font-weight: bold;
    text-align: center;
    background-color:#dec79a;
    color: #513913;
    border: 1px solid;
    border-color: #d0843e #78561d #78561d #d0843e;
    }
    a:hover.button{
    text-decoration: none;
    background-color: #624617;
    color: #fff;
    }
    #content{
    background-color: #e9d9bb;
    width:800px;
    height: 300px;
    }
    #footer{
    border-top:1px dotted #be882e;
    background-color:#e9d9bb;
    font-size: 10px;
    font-weight: normal;
    padding-top: 2px;
    padding-bottom: 2px;
    width: 800px;
    }
    

    Der IE heult eh rum und macht meinen mouseover effekt net...
     
  2. 16. März 2007
    AW: kein link aber warum? css

    hm, hast du eh die css datei in die html datei im head eingebunden?^^

    ich werds mir mal genau anschauen!

    greetz Gröbi

    Edit:

    Code:
    <a class="button"><a href="histo.html">Unternehmen</a></a>
    sollte denk ich mal eher so aussehen:
    Code:
    <a class="button" href="histo.html">Unternehmen</a>
     
  3. 16. März 2007
    AW: kein link aber warum? css

    Der IE braucht wahrscheinlich das href="" Attribut.

    Außerdem würde ich der Klasse .button noch ein display: block; geben.
    Links sind standardgemäß Inline Elemente. Und die Verbschachtelung
    von Links ist nicht erlaubt.
     
  4. 17. März 2007
    AW: kein link aber warum? css

    du hast die möglichkeit verweiße ohne ziel mit href="#" zu versehn, dann leitet der link nirgendwo hin, aber zählt als normaler verweiß.
     
  5. 17. März 2007
    AW: kein link aber warum? css

    also wenn ich das jetzt so mach tut sich leider auch net viel ausser das anscheinend ein link hinterlegt is aber wenn man drauf drückt nicht viel passiert.

    Code:
    <div id="menue">
     <a class="button" href="index.html">Startseite</a>
     <a class="button" href="produ.html">Produkte</a>
     <a class="button" href="untern.html">Unternehmen</a>
     <a class="button" href="konta.html">Kontakt</a>
     <!--menue--></div>
    
    und wenn ich display: "block" in dem fall eintrage zeigt er meine kästchen untereinnander
     
  6. 18. März 2007
    AW: kein link aber warum? css

    Also die Links sind jetzt in fehlerfreiem HTML geschrieben. Sie sollten also auf
    die jeweiligen Seiten verweisen. Es passiert nicht wenn du sie anklickst?

    Wenn die Links nebeneinander angezeigt werden sollen dann gib der Klasse
    .button neben dem display: block; noch ein float: left;. Wenn du float einsetzt
    musst du aber noch der ID #menue ein overflow: hidden; und ein clear: both;
    geben.
     
  7. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.