I've got this in my .css file:
h2.spielbox {
margin-bottom:80px;
color:#f00;
}
a.spielbox {
text-decoration:none;
background-color:#aff;
}
But in my html file the h2 style is not showing, while the a-style works:
<div class="spielbox" style="float:left;width:320px"><h2>Testberichte</h2>
Seems i am not knowing something about CSS ?
you have set the spielbox class for h2, so you need to type it in h2,
<h2 class="spielbox">...</h2>
It's because you have the class applied to a div
. Do this instead:
<h2 class="spielbox">Testberichte</h2>
Alternately, you can do this if you want to leave it in the div:
.spielbox h2 {
margin-bottom:80px;
color:#f00;
}
h2.spielbox
matches h2
elements with the class spielbox
.spielbox h2
matches h2
elements that are within any element with the class spielbox
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With