Display:none; NOT WORKING

Hi there!
I can’t figure out why Display:none; not hide the div. look at here

CSS

.hidden {
    display:none !important;
  }

HTML

<div class="hidden" id="thankYou">
            <h2>Thank you so much</h2>
        </div>

display:none is not inherited, so your h2 is still visible

1 Like

May I ask you to share the correct code?

I don’t know what’s the correct code, it’s your project :person_shrugging:

The div is hidden, the h2 is not hidden because display is not inherithed.

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