'Hide menu-text (div) on website (php, html)

I have a simple website, using php, html, css, and would like to hide two menu buttons:

menu box & text

<div class="filter margin"></div>
<div class="filter_options">
    <div class="filter_op filter_op_selected" data-type="type" data-id="bla 1">
        <div class="filter_check"></div>
        <div class="filter_value">bla</div>
        </div>
    <div class="filter_op " data-type="type" data-id="bla 2">
        <div class="filter_check"></div>
        <div class="filter_value">bla</div>
        </div>
                    
                    

Still it is necessary, that the upper box is ticked & as such recognized by the code; for the correct work-logic of the menu.

Thanks for any tip or suggestion.

[I know that in the code language mql4/5, which is based on php, you can simply hide a line of code when typing # in front of it. It won't be shown, but it will be used (if such a box is hidden but ticked, it will behave like that). I was asking myself how to do that in php]



Solution 1:[1]

After researching a lot, I've come to the following answer:

<div class="filter margin"></div>
<div class="filter_options">
  <div
    class="filter_op filter_op_selected"
    data-type="type"
    data-id="bla 1"
    style="height: 0; visibility: hidden; font-size: 0; padding: 0; margin: 0"
  >
    <div class="ranking_filter_check"></div>
    <div class="ranking_filter_value">bla</div>
  </div>
</div>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 C0ZEN