• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

p class nimmt Werte von p

xXxPeterPanxXx

Neues Mitglied
Hi,
ich habe ein echt blödes Problem.:mrgreen:

Ich habe dem p Tag in der CSS Datei margin-top : 16px; zugewiesen, dass Problem ist aber das es auch für p.datum gilt, obwohl ich p.datum margin-top : 5px zuweise. Die margin-werte sollen aber gerne beim p Tag bleiben, so würde ich mir viel Arbeit sparen.

Geht das?

Der p Tag:

Code:
#content p {
font-family : sans-serif, arial, verdana, times;
font-size : 1em;
margin-top : 16px;
}

p.datum:

Code:
p.datum {
margin-top : 5px;
margin-left : 5px;
border : 1px solid #999999;
width : 7em;
float : left;
background-color : #ffe38f;
text-align : center;
font-weight : bold;
font-size : 0.5em;
font-family : sans-serif, times, arial;
padding : 7px;
}

MfG xXxPeterPanxXx
 
Hi, ich bin mir nicht sicher, aber ich denke mal wenn CSS logisch ist :D dürfte ein !important ausreichen also in der Regeln vom p.datum

margin-top:5px !important;



und es beim allgemeinem p ganz normal lassen.


MfG
 
Zurück
Oben