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 ?
It’s because you have the class applied to a
div. Do this instead:Alternately, you can do this if you want to leave it in the div:
h2.spielboxmatchesh2elements with the classspielbox.spielbox h2matchesh2elements that are within any element with the classspielbox