I encountered a challenge while working on an HTML project. I included a checkbox that should highlight all text input fields when checked. However, I'm facing an issue where some of the input fields within tables are not being affected by my code. Any assistance on this matter would be highly appreciated.
Here is the relevant code snippet:
HTML:
<input type="checkbox" value="ShowAll" id="mut" />
<!--Tätigkeit-->
<input type="text" class="tt" id="BT" />
<input type="text" class="tt" id="MA" />
<table id="tatigkeit">
<tr><td><input type="text" class="tt" id="tBT" /></td><td><input type="text" class="tt" id="tEB" /></td><td><input type="text" class="tt" id="tTT" /></td></tr>
[Additional table rows with text input fields]
</table>
<!--Anlieferungen + Geratschaften + Besondere Vorkommnisse-->
<input type="text" class="tt" id="ANL" />
<input type="text" class="tt" id="GER" />
CSS:
#mut:checked ~.tt
{
background: #ffffaa;
}
Despite several attempts, I consistently encounter the same issue.