Skip to content
TheChatArchiveThe Chat Archive
gpt-4o-2024-05-13· OpenAIAi2 WildChat-4.8M (AI2)

Will this make each h2 under .fielditems invisible? If not how do I fix this .pookiepie…

  1. 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; } }

  2. 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 h2 element under .field__items invisible 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__items and its child h2 elements, making sure each h2 under .field__items is set to display: none.