In your CSS you’ve
#Main-button {
width:200px;
}
but the JS is adding dynamic inline style based on content. So it’s having style
attribute.
So in terms of CSS specificity their CSS beats you.
You must use !important
in your rule to avoid overriding of your CSS.
#Main-button {
width:200px !important;
}
0
solved Cannot style Jquery element using CSS