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

Tell us what’s happening:

Step 54
Now target the th elements within your table body, and give them a width of the entire container, less 12rem.

I have typed the syntax exactly as shown in other forum posts and even youtube walkthroughs on this exact exercise, but it just won’t accept my code.
If someone else can see what I can’t, please tell me!! I’m losing it over here.

Code:
tbody th {
width: calc(100% - 12rem);
}

Your code so far

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

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

tbody th {
  width: calc(100% - 12rem);
}

/* 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/126.0.0.0 Safari/537.36

Challenge Information:

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

1 Like

Hi there and welcome to our community!

Your code is correct but perhaps there’s an error elsewhere in your CSS? Have you lost the closing curly bracket from the previous selector for instance?

1 Like

I could cry. You guessed the problem exactly.

The program just kept telling me something was wrong with the specific tbody th step, not that anything else was amiss.

Thank you so much!!!

2 Likes

It’s a very common and easy mistake to make. Sometimes the error messages can be misleading, as they’re testing the specific input for the step which you’re on and won’t necessarily recognise that the error is elsewhere.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.