I have created a custom style sheet that overrides the original CSS for my WordPress template. However, on my calendar page, the original CSS has the height of each table cell set with the !important declaration:
td {height: 100px !important}
Is there some way I can override this?
Overriding the !important modifier
!important, and give the selector a higher specificity (adding an additional tag, id or class to the selector)Some examples with a higher specificity (first is highest/overrides, third is lowest):
Or add the same selector after the existing one:
Disclaimer:
It’s almost never a good idea to use
!important. This is bad engineering by the creators of the WordPress template. In viral fashion, it forces users of the template to add their own!importantmodifiers to override it, and it limits the options for overriding it via JavaScript.But, it’s useful to know how to override it, if you sometimes have to.