dimanche 24 mai 2015

Share properties between classes

I have two classes which share properties for example:

.divone{ width:10px; height:20px; float:right; cursor:pointer; }
.divtwo{ width:11px; height:10px; float:right; cursor:pointer; }

As you can see, both classes share properties: "float" and "cursor". How can I declare both properties in a same class and then apply it to both classes? Kind of like this:

.sharedproperties{ float:right; cursor:pointer; }

.divone{ width:10px; height:20px; (+ .sharedproperties)}
.divtwo{ width:11px; height:10px; (+ .sharedproperties)}

Thanks!




Aucun commentaire:

Enregistrer un commentaire