If I have one div element for example and class \'first\' is defined with many css properties. Can I assign css class \'second\' which also has many properties differently
An HTML element like div can have more than one classes. Let say div is assigned two styles using addClass method. If style1 has 3 properties like font-size, weight and color, and style2 has 4 properties like font-size, weight, color and background-color, the resultant effective properties set (style), i think, will have 4 properties i.e. union of all style sets. Common properties, in our case, color,font-size, weight, will have one occuerance with latest values. If div is assigned style1 first and style2 second, the common prpoerties will be overwritten by style2 values.
Further, I have written a post at Using JQuery to Apply,Remove and Manage Styles, I hope it will help you
Regards Awais