why my div width 100% not working even I use new class

Viewed 76

I have submenu with default class .sub-menu with fixed width 270px. and I have one has custom class .sub-menu-custom. But it still use the old class with 270px even i don't put it.

enter image description here

even on inspect element, there is no 270px

enter image description here

and this is my code.

#custom-menu-news-and-events .sub-menu-custom {
    position: absolute;
    left: initial;
    right: 0;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
}

you can see my site here: https://gcm.edu.ph/

1 Answers

It's working as expected and setting the width to 100% of the parent element (li). Change your .sub-menu-custom to read like the others:

#custom-menu-news-and-events .sub-menu-custom {
    position: absolute;
    left: initial;
    right: 0;
    max-width: none;
    width: 100%;
    overflow: hidden;
    position: fixed;
}
Related