Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

davy_yg's avatar
Level 27

li.open

What is li.open ? It is my first time hearing it.

#cssmenu > ul > li.open > a {

color: #eeeeee;
background: #1fa0e4;
background: -webkit-linear-gradient(#1fa0e4, #1992d1);
background: -moz-linear-gradient(#1fa0e4, #1992d1);
background: -o-linear-gradient(#1fa0e4, #1992d1);
background: -ms-linear-gradient(#1fa0e4, #1992d1);
background: linear-gradient(#1fa0e4, #1992d1);

}
0 likes
6 replies
petritr's avatar

@DAVY_YG Should be just an normal class name .open

<ul>
    <li class="open"><a href=""></a></li>
</ul>
petritr's avatar
petritr
Best Answer
Level 15

@davy_yg There is an open class when some li is open:

<li class="has-sub open"><a style="text-shadow: rgba(0, 0, 0, 0.35) 0px 1px 1px;"><span style="border-color: rgba(0, 0, 0, 0.35);"><i class="fa fa-fw fa-bars"></i> Menus</span><span class="holder" style="border-color: rgba(0, 0, 0, 0.35);"></span></a>
        <ul style="display: block;">
           <li class="has-sub"><a href="#"><span>Menu 1</span></a>
              <ul style="">
                 <li><a href="#"><span>Menu 1.1</span></a></li>
                 <li><a href="#"><span>Menu 1.2</span></a></li>
              </ul>
           </li>
           <li><a href="#"><span>Menu 2</span></a></li>
        </ul>
     </li>

Here it is check first line: <li class="has-sub open"> Exactly as i wrote you the first time, when an li is active the open class is appended.

davy_yg's avatar
Level 27

I wonder if all the same class name called .siblings ()

petritr's avatar

I think i answered your question. :)

D9705996's avatar

@davy_yg

there is no open class in html.

You are correct but the open appears within the class attribute on the <li> HTML element. The class attribute is related to the CSS classes that applied to this element.

There is no standard set of CSS identifiers for classnames (although contents like BEM do exist) so "open" means whatever the author of the slabbed accordian wants it mean. They will just be using this so their JavaScript can toggle or target which html elements to make visible

Please or to participate in this conversation.