Primefaces Menubar does not enter div

Asked

Viewed 237 times

1

Good night.

My menubar is not entering the div in which it is contained.

<header>
    <h:graphicImage library="img" name="logo.jpg" id="logo"/> 
    <h:form>
        <p:growl id="messages"/>

        <p:menubar>
            <p:menuitem value="Pesquisa" url="#"/>
            <p:menuitem value="Software" url="#"/>
            <p:menuitem value="Materiais" url="#"/>
            <p:menuitem value="Contato" url="#"/>
        </p:menubar>
    </h:form>
</header>

The CSS of both is:

header {
    background-color: #333;
}

#logo {
    width: 10%;
    margin-left: 12%;
    margin-top: 0.5%;
    margin-bottom: 0.5%;
    display: inline;
}

.ui-menubar,.ui-menu-child,.ui-menu {
    float:right;
    margin-right:15%;
    width: 26% !important;  
    background-color: #aaa; 
}

.ui-menuitem-link.ui-corner-all.ui-state-hover {
    color: #fff;
    background-color: #000;
}

With this, I’m getting:

inserir a descrição da imagem aqui

What I want to do is put this menu inside the header, next to the logo.

  • 1

    It could include the Markup generated by the components?

  • What would Markup be? I’m new to Primefaces.

  • It would be the html generated for the client.

  • I ended up solving this problem in another way. I did it with HTML. I understood what Markup is now. Thanks for the clarification.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.