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

CSS Datei, teils Funktionstüchtig, teils nichts.

Derte

Neues Mitglied
Moin Leute,
Ich habe diese css Datei:
Code:
/* Tabelle: MEin Team, Mein Kader, Bank, Spielermarkt */
#scores td{
    border-bottom: 1px solid white;    /* Rahmen setzen */
    padding: 2px;                      /* Abstand zwischen Inhalt und Rahmen */
    margin-top:10px;
    margin-bottom:10px;

                    /* Abstand zwischen Text und linkem Rand vergroessern -> sieht aus wie Abstand zwischen den Zellen, zerstoert aber nicht den Rahmen */
}

#scores{
    border-collapse: collapse;         /* Kein Raum zwischen den Zellen */
    text-align: center;
    font-weight:bolder;
    margin-right:20px;
    margin-left:20px;
}

#scores tr td:first-child{
    padding-left: 2px;                 /* Die erste Reihe soll keine 20px Abstand nach links haben */
}

/* Nippel ausrichtung */
.nippel {
    vertical-align:3px;
}
/* lila Tabellenkopf*/
.thead {
    background-image: url(images/tb_head.gif);
    font-weight:bolder;
}

/* Button */
.button {a
    padding:0;
    margin:0;
    width:110px;
    font-size:11px;
    border: 2px solid #FFFFFF;
    background-image: url(/images/button/loeschen.gif)
    color:#000000;
    }
.button:active {
  background-image: url(/images/button/loeschenhover.gif); /* Beim Anklicken wird Hintergrund weiß (auch hier kannst du natürlich die Farbe ändern) */
  color:#FFFFFF
}
.button:hover {
  cursor: pointer;  /* Bei drüberfahren wird Maus zum Finger */
  background-color: #FFFFFF; /* Bei drüberfahren wird Hintergrund schwarz (kannst du natürlich nach belieben ändern) */
    color:#000000
}

/* Meldungen */
p.meldung {
    font-weight:bold;
    text-align:center;
    color:#ff0000;
    margin-bottom:10px;
}
p.nomoney {
    font-weight:bold;
    text-align:center;
    color:#ff0000;
}
p.positiv {
    font-weight:bold;
    text-align:center;
    color:#00C62A;
    margin-bottom:10px;
}
.thead {
    background-image: url(images/tb_head.gif);
    font-weight:bolder;
    text-align:center;
}
.loeschen {
    padding:3px;
    margin:3px;
    width:110px;
    font-weight:bolder;
    font-size:13px;
    background-image: url(../images/button/loeschen.gif);
    color:#000000;
    }
.loeschen:active {
  background-image: url(../images/button/loeschenhover.gif); /* Beim Anklicken wird Hintergrund weiß (auch hier kannst du natürlich die Farbe ändern) */
  color:#FFFFFF
}
.p {
    font-weight:bold;
    text-align:center;
    color:#ff0000;
    margin-bottom:10px;
}
.anbieten {
    margin-left:5px;
    margin-right:2px;
    margin-top:2px;
    margin-bottom:2px;
    font-weight:bold;
    padding-left:10px;
    background-color:#000000;
}
.aktuelle {
    width:400px;
    height:100px;
    margin-left:70px;
    margin-right:70px;
    background-color:#c26c10;
    font-weight:bold;
    text-align:center;
    border: 1px solid white;
    color:#000000;

}
.aktuelle-ueberschrift {
    width:400px;
    margin-left:50px;
    margin-right:50px;
    background-image: url(images/tb_head.gif);

}

Das meiste funktioniert. Nur: ".p", ".thead", u.a. funktionieren nicht. Wenn ich die thead und p in der Datei angebe, funktioniert alles wunderbar
(Ausgabe: z.B. <p class='p'>...</p>)

Woran liegt das?
 
Hallo.

Das ist doch völlig normal.
Wenn du eine class erstellst musst du diese auch einbinden, woher soll der Browser sonst wissen das du z. B. <p> mit der class p formatieren willst.
Wenn du <p> direkt ansprechen willst musst du den Punkt weglassen.

Code:
p {
    font-weight:bold;
    text-align:center;
    color:#ff0000;
    margin-bottom:10px;
}

Gruss
Elroy
 
Zurück
Oben