Default navigation item is not highlighted

1
Hi,  I am using the menu bar widget with the project navigation as source. My navigation has two navigation items:  - item a  > links to page a  - item b > links to page b In the navigation profile I set the default home page to page a. When I now open the application the first navigation item should be highlighted. How can I achieve this with Mendix? The items are only highlighted when selecting it.  I am using Mendix Studio Pro 9.  Thanks for your help in advance!
asked
3 answers
3

Try my Active Menu Selector widget. Direct download link below – drop this in your /widgets directory and press F4 in Studio Pro to refresh it.

https://github.com/tieniber/ActiveMenuSelector/blob/master/dist/ActiveMenuSelector.mpk?raw=true

See the readme for details on how to implement (it should be super easy).

answered
1

you can use below css to make selected item highlighted

 

.mx-navbar ul.nav > li.mx-navbar-item.active{

    /* border-bottom: 5px solid red; */

    border-bottom: 5px solid white;

}

.region-topbar .mx-navbar ul.nav > .mx-navbar-item.open .dropdown-menu > li.mx-navbar-subitem.active a {

    color: red;

    background-color: #fff;

}

 

answered
0

Hi Anna

You could try writing custom css/sass for your requirement and use the :selected property on the navigation item.

More information on customizing your style of your application here: Implement Styles - Studio Pro 9 How-to's | Mendix Documentation and Customize Styling - Studio Pro 9 How-to's | Mendix Documentation

Hope this helps.

Kind regards,

Leander

answered