CSS - It is possible to assign the same specification of a class to an id

trekApers

New Member
I am working with an application which auto-generates some HTML pages and I need to write some CSS files these pages. I want to reuse several classes (generated by jquery-ui theme), but I can not change any HTML element.So, is it possible to assign the same specification of a class to an id?If this is possible, then I would easily create a mapping between my classes and ids.Example:\[code\]<html><head><style>#charlieID { /* I want #charlie to be identical to .alphaClass */ /* Assume that I can not change the HTML (it will be auto generated by another application)*/}.alphaClass { font-size: small; color: lime;}.betaClass { font-size: medium; color: blue;}</style></head><body> <p class="alphaClass">Alpha</p> <p class="betaClass">Beta</p> <p id="charlieID" class="charlieClass">Charlie</p><body></html>\[/code\]
 
Top