Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
change menubar style
Hi,
i try to change the style of my menubar.
I added a picture to display it easy.
I try to make a Menubar leftsided and a Label rightsided. The HorizontalLayout in back i give the stylename "v-menubar", so it looks like the menubar.
But know i have to delete the broder from typical MenuBar.
I try it like this:
I add a StyleName "v-menubar-inner" and set in css "border: 0" in my <my-theme>.scss But it wont work. It doesn´t change the menubar.
I try to set a background-color to test the css style but it also wont work.
I don´t know, how i can edit the style.
Thanks for your help.
BR
Dominik
Hey Dom,
This should do it.
@Override
protected void init(VaadinRequest request) {
final HorizontalLayout layout = new HorizontalLayout();
layout.setMargin(true);
setContent(layout);
layout.addStyleName("v-menubar");
layout.setWidth("100%");
MenuBar mb = new MenuBar();
mb.addItem("", FontAwesome.POWER_OFF, null);
mb.addStyleName(ValoTheme.MENUBAR_BORDERLESS);
layout.addComponents(mb, new Label("Testing"));
}
Ok, today i got the time and try it.
It works fine. Thanks!