I have <select multiple="multiple">..</select> select and I also have select{heigth: 30px;} in some stylesheet that I cannot edit. Now my multiple select have 1-row heigth – “size” attribute cannot be applied. How can I solve the problem?
I have <select multiple=multiple>..</select> select and I also have select{heigth: 30px;} in some stylesheet
Share
Well, first off – I’m assuming that you’re using the
heightproperty, not the misspelledheigthproperty. There’s two ways you could solve this.The first (which I don’t recommend) is by simply appending the style to the HTML element, like below:
Or, instead, my suggestion would be making a second style sheet, that uses the following property, including the “!important”, which follows the attribute value:
Doing it like such will override the original style, and replace it. This isn’t the only method that you can use to override it – you can read here on CSS specificity.