1

I want to add a css property in a class using JavaScript.

Example

<style type="text/css">
.AClass{
   color:#ccc;
   padding:5px;   
}
</style>

I want add a property height:500px; in this class using javascript, not on that element which class is AClass. So finally my class should be

 <style type="text/css">
    .AClass{
       color:#ccc;
       padding:5px;   
       height:500px;
    }
    </style>

But programmatically.

Please Advice me

Sarwar Hasan
  • 1,561
  • 2
  • 17
  • 25
  • 1
    possible duplicate of [How do you add CSS with Javascript?](http://stackoverflow.com/questions/707565/how-do-you-add-css-with-javascript) – Itay Sep 15 '13 at 07:41
  • 2
    check http://stackoverflow.com/questions/1212500/jquery-create-css-rule-class-runtime – DGS Sep 15 '13 at 07:51

0 Answers0