gpt-4o-2024-05-13· OpenAI
WildChat-4.8M (AI2)
Will this make each h2 under .fielditems invisible? If not how do I fix this .pookiepie…
- User
Will this make each h2 under .field__items invisible? If not how do I fix this
.pookiepie .field__items { display: flex !important; gap: 3px; & h2 { display: none; } }
- Assistant
The CSS you have written employs nested rules, which is a feature commonly found in CSS preprocessors like Sass or Less. However, standard CSS does not support this kind of nesting. If you want to make each
h2element under.field__itemsinvisible using standard CSS, you need to write the rules without nesting.Here is how you can adjust your CSS to work correctly in standard CSS:
.pookiepie .field__items { display: flex !important; gap: 3px; } .pookiepie .field__items h2 { display: none; }This separates the style declarations for
.field__itemsand its childh2elements, making sure eachh2under.field__itemsis set todisplay: none.