Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1347940

    Hello.
    I have a trouble with custom css. I added class name to Custom CSS Class field of submenu and quick CSS, but it doesn’t work at all.

    I set submenu which appears only mobile. When I didn’t set custom css class, it works perfectly. But once I add custom css class, it appears on desktop.

    Could you please check it?

    #1347963

    Hi Ayumi,

    Which class are you adding, and what is not working? Please try to explain a bit further what you are looking to achieve.

    Best regards,
    Rikard

    #1348090

    Hi Rikard,
    I set submenu on the top page and I want to make it appears only mobile. Therefore, I add below to Quick CSS.

    /* Remove submenu on desktop */
    @media only screen and (min-width: 1024px) {
    #top .av-submenu-container { display: none !important; }
    }

    This code works perfectly.

    But, I would like to use different submenu another page, it appears both desktop and mobile. So, I added custom CSS class “topsubmenu” to submenu on top page and change css as below;

    /* Remove submenu on desktop */
    @media only screen and (min-width: 1024px) {
    #top .topsubmenu .av-submenu-container { display: none !important; }
    }

    After that, the submenu appears both desktop and mobile. Now I set custom CSS class to submenu on the top page and Quick CSS.

    #1348093

    the custom class – if you set it directly to the alb element (submenu) itself goes to the submenu container.
    so it is the same place – therefore it has to be placed without space in the rule – and because it is after the av-submenu-container class :

    @media only screen and (min-width: 1024px) {
    	#top .av-submenu-container.topsubmenu { display: none !important; }
    }
    #1348096

    Hi Guenni,

    Thank you for your help. The code works perfectly.
    I mistook the order of the class, didn’t I? Also I needed to delete space before the custom class.
    Thank you a lot.

    #1348112

    Hi,

    Great, I’m glad that @guenni007 could help you out. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1348173

    Rikard,
    My problem has been solved. Could you please close the topic?
    Best regards,
    Ayumi

    #1348181

    yes – different classes on the same element are noted without space. .av-submenu-container.topsubmenu
    if you have .av-submenu-container .topsubmenu the av-submenu-container has a child with class: topsubmenu. What is not the fact.
    The order is then also important, with parent – child relationships anyway – and here at the same element in particular.

    #1348189

    @guenni007 Thank you for teaching me. I’m appreciated!

    #1348214

    Hi kazeko,

    Thanks for the update, I’ll close this thread for now then. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Custom CSS doesn't work’ is closed to new replies.