so there is no problem with the code, i just wanted to ask a doubt regarding this line of code tr[class="total"] th{text-align:left; padding:0.5rem 0 0.25rem 0.5rem;}
when and why do we use this selector? tr[class="total"] th
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Challenge: Learn More About CSS Pseudo Selectors By Building A Balance Sheet - Step 56
With this CSS rule, you target (give a style to) the th elements within your table rows where the class is total:
<tr class="total"> ...a table row with the class "total"
<th>Total <span class="sr-only">Liabilities</span></th>
.
.
.
This is one of those ‘th’ elements.
In short, you use that CSS rule when you want to style only particular elements within the other element that repeats throughout the code (including also the one that you target).