How to hide a checkbox from materialize css by css

0

I'm having a problem, I'm not able to hide an element using only the display: none in a materialize framework checkbox.

I tried this way:

  .listaPerfil input{
    display: none;  
  }
    
asked by anonymous 22.09.2017 / 03:43

1 answer

0

The materialize is composed of two elements:

The input that is the element itself

<input type="checkbox" id="test5" />

And the label that is the visual part of the element

<label for="test5">Red</label>

So one solution is to hide what involves these two elements.

Let's get this case that's in their documentation:

<p>
  <input type="checkbox" id="test5" />
  <label for="test5">Red</label>
</p>

Let's put a class in the p tag

<p class="meucheck">
  <input type="checkbox" id="test5" />
  <label for="test5">Red</label>
</p>

And css looks like this:

.meucheck{
    display:none;
}

Hiding the element completely.

You can also use the ready-made materialize class, see this link in the 'Hiding / Showing Content' section, which shows all the options.

link

    
22.09.2017 / 04:26