Styling-E-Mail / link href="mailto:" mit CSS

Dank StackOverflow habe ich endlich einen Weg gefunden, um Stil meine E-Mail-link, aber ich Frage mich, warum es nicht funktioniert ohne die Lösung fand ich hier.

Da der link ist Teil der Spannweite mit dem zugewiesenen Klasse "über", die Schriftgröße und den Stil definiert, sollte nicht die E-Mail-link zeigen, bis in 11px und sans serif?

und während

a[href^="mailto:"]

{ 
  font-family: sans-serif;
  color: black;
  font-size: 11px;
}

funktioniert Super, sobald ich versuche es zu ändern, in

.about a[href^="mailto:"]

{ 
  font-family: sans-serif;
  color: black;
  font-size: 11px;
}

es nicht funktioniert, wie soll es auch.

tun-tags nicht hören span Formatierung oder Klasse verschachteln?

    <!DOCTYPE html>
<html>
<head>
<style type="text/css">

html {
    height:100%;
}

body {
    height: 100%;
    margin-left: 20px;
    margin-top:0px;
}

.bottom-left {

    position: absolute;
    font:sans-serif;
    bottom: 15px;
    left: 15px;
}


.bold {
    font-family: serif;
}


.about {
    font-size: 11px;
    font-family: sans-serif;
}


/*a[href^="mailto:"]

{ 
  font-family: sans-serif;
  color: black;
  font-size: 11px;
}*/



.address {
font-size: 11px;
border-bottom: 1px grey dotted;
}




</style>

<title>TEMP</title>

</head>
<body>


<div class="bottom-left">
        <span class="about">
            <span class="bold">XYZ</span> is a project space .&nbsp;&nbsp;&#124;&nbsp;
            <span="address">Website Information</span> &mdash; <a href="mailto:[email protected]">[email protected]</a>
        </span>
</div>



</body>
</html>

InformationsquelleAutor Roland | 2012-05-17

Schreibe einen Kommentar