objektorientiert Vererben in CSS?

objektorientiert Vererben in CSS?

Beitragvon Silo » 23.08.2005, 18:53

Ich habe folgende Zwei definitionen gemacht:

Code: Alles auswählen
div.smallpicleft {
   border:2px solid #000;
   display:table-cell;
   padding:5px 5px 5px 5px; /* top - right - bottom - left */
   margin:0px 5px 0px 0px; /* top - right - bottom - left */
   text-align:center;
/* + */   float:left;
}

div.smallpicright {
   border:2px solid #000;
   display:table-cell;
   padding:5px 5px 5px 5px; /* top - right - bottom - left */
   margin:0px 0px 0px 5px; /* top - right - bottom - left */
   text-align:center;
/* + */   float:right;
}


Die unterscheiden sich im wesentlichen nur in dem float.

Kann man das nicht irgentwie vereinfachen (im Sinne der objektorientieren Vererbung/Ableitung), sonst wird mir die CSS-Datei etwas groß und unübersichtlich?
Benutzeravatar
Silo
neu hier
 
Beiträge: 4
Registriert: 03.03.2005, 15:03

Moderatoren: Laus, Moderatoren

Ähnliche Beiträge zu "objektorientiert Vererben in CSS?"

Zurück zu: CSS für Anfänger

Wer ist online?

Mitglieder in diesem Forum: Google [Bot] und 7 Gäste