Malte Kiefer: Links

Hi,

ich habe gerade mit CSS die Formatierung für meine Links gemacht. Ich habe nur ein Problem, wie mache ich das alle Links gleich groß sind, also der Kasten um die Links, habe es so versucht nicht geklappt:

A:link {
color : black;
padding : 8px;
width:100%;
height:20%;
border : 1px solid #000000;
text-decoration: none; }

A:visited {
color : black;
padding : 8px;
width:100%;
height:20%;
border : 1px solid #000000;
text-decoration: none; }

A:hover {
color : black;
background-color : #575f2b;
padding : 8px;
width:100%;
height:20%;
border : 1px solid #000000;
text-decoration: none; }

A:active {
color : black;
background-color : #575f2b;
padding : 8px;
width:100%;
height:20%;
border : 1px solid #000000;
text-decoration: none;
}

Kann mir einer Helfe? Danke im voraus

  1. Hallo Malte,

    A:link {
    color : black;
    padding : 8px;
    width:100%;
    height:20%;
    border : 1px solid #000000;
    text-decoration: none; }

    Das a-Element ist ein Inline-Element. Weise ihm die Eigenschaft 'display:block' zu.

    Verkürzen lässt sich deine Scheibweise auch noch:

    a {
    display:block;
    width:100%;
    height:20%;
    color : black;
    padding : 8px;
    border : 1px solid #000;
    text-decoration: none; }

    a:hover {
    background-color : #575f2b;
    }

    a:active {
    background-color : #575f2b;
    }

    Mit freundlichen Grüßen

    André

    1. Hallo Malte,

      hat's geholfen?

      Mit freundlichen Grüßen

      André