How I can show dropdown menu horizontally in NavBar?

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

How I can show dropdown menu horizontally in NavBar?

Postby aijazalidadu5 » Wed Dec 22, 2021 6:59 am

menuItems.push({itemId: '6', text: 'Menu', position: 'RIGHT', tooltip: 'A submenu',
subMenuItems:
[
{ text: 'Action'},
{ text: 'More action'},
{text: 'Last action'}
]
});


I want that dropdown menu should be opened horizontally instead of vertically, Please help if anyone has any idea or suggestion. Thanks
aijazalidadu5
 
Posts: 6
Joined: Wed Dec 22, 2021 6:33 am

Re: How I can show dropdown menu horizontally in NavBar?

Postby sean » Wed Jan 05, 2022 8:52 pm

Hi Aijaz,

Thanks for posting on the forum.

The NavBar component is meant to be oriented horizontally with vertical drop-downs.
There is another component, SideNav, which is meant to orient vertically. Does that work for your use case?
If not, please share a screenshot of an example of what you are trying to achieve.

Best,
Sean
Software Engineer
Servoy USA
sean
 
Posts: 370
Joined: Mon May 21, 2007 6:26 pm
Location: USA

Re: How I can show dropdown menu horizontally in NavBar?

Postby aijazalidadu5 » Thu Jan 06, 2022 9:33 am

Thank you, Dear Sean for your response.

I want that a submenu (dropdown) should open horizontally instead of vertically.
A related picture is attached below for example.

Regards
Aijaz
Attachments
horizontallyDropDown.PNG
horizontallyDropDown.PNG (45.54 KiB) Viewed 3407 times
aijazalidadu5
 
Posts: 6
Joined: Wed Dec 22, 2021 6:33 am

Re: How I can show dropdown menu horizontally in NavBar?

Postby paronne » Fri Jan 07, 2022 10:01 am

Hi Aijaz,

there isn't a component property which allow you to display the dropdown menu horizontally instead of vertically.
You can try to apply some custom CSS.
In a small sample i have tried this CSS rule and works for me

Code: Select all
.bts-extra-navbar ul > li {
    display: inline-block;
}


However i can't tell if will be a good fit in case you have many items in your submenus.

Regards,
Paolo
paronne
 
Posts: 202
Joined: Fri Nov 02, 2012 3:21 pm


Return to Web Development

Who is online

Users browsing this forum: No registered users and 3 guests