jQuery UI Widgets Forums Navigation Menu, Context Menu box shadow and jqxMenu

This topic contains 2 replies, has 2 voices, and was last updated by  bronson3 11 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • box shadow and jqxMenu #3955

    bronson3
    Member

    I\’d like to surround each sub menu with a CSS3 box shadow. The problem is shadow width and the blur distance aren\’t taken in calculation for the parent div\’s width.
    Is there an break through ?
    Thks for answering

    box shadow and jqxMenu #3959

    Minko
    Blocked

    Hello,

    here is a solution for your problem:

    CSS:

    <style type="text/css">
    .dropdown-shadow
    {
    -webkit-box-shadow: 5px 4px 10px #333333;
    box-shadow: 5px 4px 10px #333333;
    }
    .dropdown-parent
    {
    padding-left: 7px;
    padding-top: 7px;
    padding-right: 7px;
    }
    </style>

    JavaScript:

    //Initialization of jqxMenu
    $("#jqxMenu").jqxMenu({ width: '600', height: '30px', theme: 'classic' });
    //Set shadow to jqxMenu's submenus and padding to their wrapper
    $('.jqx-menu-dropdown').addClass('dropdown-shadow').parent().addClass('dropdown-parent');

    In the code above after the initialization of jqxMenu you have to set shadow to all it’s submenus and padding to the submenu’s wrapper.
    If your shadow is with bigger length the padding should be bigger.

    Best regards,
    Minko

    jQWidgets Team
    http://jqwidgets.com/

    box shadow and jqxMenu #3971

    bronson3
    Member

    It works fine.
    Many thks.
    For display purposes i’ve added a margin left attribute on dropdown-parent css

    .dropdown-parent
    {
    padding-left: 7px;
    padding-top: 7px;
    padding-right: 7px;
    margin-left : 15px; // open direction is left
    }

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.