I am facing an issue with my HTML and CSS. The HTML code I have looks like this:
<div id="main" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<div id="main-top">
<select id="entity" name="entity" class="monospace" >
<input id="client" type="text" name="client" class="monospace">
</div>
<!-- Rest of the page content -->
...
</div>
And my CSS code is as follows:
.ui-widget input { font-family:Lucida Sans Unicode,Verdana,Arial,sans-serif; }
.monospace{ font-family: Lucida Console, Courier New, monospace; }
Currently, the first style is being applied to both input elements despite having the .monospace class assigned to them. What I actually want is for the first style to apply to all inputs on the page unless the .monospace class is present, in which case I want the second style to be applied. I understand that my approach is incorrect and that a different CSS structure may be needed. Can anyone offer advice on how to achieve this?