Learn More About CSS Pseudo Selectors by Building A Balance Sheet - Step 57

Tell us what’s happening:

tr .total td{
text-align: right;
padding: 0 0.25rem;
}

but it keep saying u should have tr .total td selector. Im so lost

Your code so far

<!-- file: index.html -->

/* file: styles.css */
/* User Editable Region */

tr .total td{

}

/* User Editable Region */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36

Challenge Information:

Learn More About CSS Pseudo Selectors by Building A Balance Sheet - Step 57

This is my code.

html{
box-sizing: border-box;
}
body{
font-family: sans-serif;
color: #0a0a23;
}
table caption{
color: #356eaf;
font-size: 1.3em;
font-weight: normal;
position: absolute;
top: -2.25rem;
left: 0.5rem;
}
section{
max-width: 40rem;
margin: 0 auto;
border: 2px solid #d0d0d5;
}
h1{
max-width: 37.25rem;
margin: 0 auto;
padding: 1.5rem 1.25rem;
}
h1 .flex{
display: flex;
flex-direction: column-reverse;
gap: 1rem;
}
h1 .flex span:first-of-type{
font-size: 0.7em;
}
h1 .flex span:last-of-type{
font-size: 1.2em;
}

table{
border-collapse: collapse;
border: 0;
width: 100%;
margin-top: 3rem;
position: relative;
}
tbody td{
width: 100vw;
min-width: 4rem;
max-width: 4rem;
}
tbody th{
width: calc(100% - 12rem);
}
tr[class=“total”] th{
text-align: left;
padding: 0.5rem 0 0.25rem 0.5rem;
}
tr[class=“total”]{
border-bottom: 4px double #0a0a23;
font-weight: bold;
}
tr .total td{
text-align: right;
padding: 0 0.25rem;
}

span[class~=“sr-only”]{
border: 0 !important;
clip: rect(1px, 1px, 1px, 1px) !important;
clip-path: inset(50%) !important;
height: 1px !important;
width: 1px !important;
overflow: hidden !important;
white-space: nowrap !important;
position: absolute !important;
padding: 0 !important;
margin: -1px !important;
}
span{
font-weight: normal;
}
#years{
display: flex;
top: 0;
justify-content: flex-end;
position: sticky;
background-color: #0a0a23;
color: #fff;
margin: 0 -2px;
padding: 0.5rem calc(1.25rem + 2px) 0.5rem 0;
z-index: 999;
}
#years span[class]{
font-weight: bold;
width: 4.5rem;
text-align: right;
}
.table-wrap{
padding: 0 0.75rem 1.5rem 0.75rem;
}

double check the spacing, it is not correct

1 Like

my bad, I initially assume it use space since tr[class~=“total”] do the same thing as tr.total
I’ll be careful next time. thanks

you don’t use any space in tr[class~=“total”] tho

the space between selectors means thatt he right one is descendant of the left one, for two selectors for the same element there should be no space