I have a group of divs with a similar style, but each one has different padding and margin settings. Here is an example:
<div class="mainStyle" id="cc">CC</div>
<div class="mainStyle" id="bb">BB</div>
<div class="mainStyle" id="aa">AA/div>
Here is the CSS for the main style:
.mainStyle {
float: right;
width: 60px;
text-align : center;
font: 95% Arial;
-moz-border-radius: 5px;
border-radius: 5px;
background : #69abd0;
}
And here are the specific styles for each ID:
#aa {
margin: 0px 2px 0px 2px;
padding: 2px 0 5px 0;
}
#bb {
margin: 10px 2px 10px 2px;
padding: 2px 0 5px 0;
}
#cc{
margin: 10px 2px 10px 2px;
padding: 20px 0 50px 0;
}
I am looking for a way to streamline this code as the only differences between each element's style are the padding and margins. How can I combine the class style with the individual element styles?
Your insight is much appreciated!