NAV Tag does not occupy the specified width

1

The NAV tag does not occupy the specified 1200px width, getting smaller than required. And the NAV tag of the next menu occupies the line not occupied by NAV higher.

See the example:

Asmentioned,theorange%colortagdoesnotoccupy1200pxwide,sothetagNAVbelowgoesuptofillwhathasnotbeenfilledbyNAVhigher.

CSSNAVorangecolor:

/*Menuprincipal*/nav.menuprincipal{width:100%;height:auto;max-width:1200px;margin:auto;}nav.menuprincipala{color:#ffffff;padding:15px;display:block;text-decoration:none;text-align:center;background-color:#FF8922;}nav.menuprincipalul{list-style:none;position:relative;}nav.menuprincipalulli{width:auto;float:left;}nav.menuprincipala:hover{background-color:#DD6900;}

BotNAVTag:

.menudestaques{width:100%;height:auto;font-size:13px;max-width:1200px;margin:auto;margin-top:10px;}.menudestaquesa{color:#222;padding:15px;display:block;text-decoration:none;text-align:center;}.menudestaquesul{list-style:none;position:relative;}.menudestaquesulli{width:auto;float:left;}

HTML

<navclass="menuprincipal">
            <ul>
                <li><a href="#" title="Notícias">NOTÍCIAS</a></li>
                <li><a href="#" title="Imóveis">IMÓVEIS</a></li>
                <li><a href="#" title="Colunistas">COLUNISTAS</a></li>
                <li><a href="#" title="Guarapari">GUARAPARI</a></li>
                <li><a href="#" title="Cidades Vizinhas">CIDADES VIZINHAS</a></li>
                <li><a href="#" title="Praias">PRAIAS</a></li>
                <li><a href="#" title="Empregos">EMPREGOS</a></li>
                <li><a href="#" title="Cuinária">CULINÁRIA</a></li>
                <li><a href="#" title="Guia Comercial">GUIA COMERCIAL</a></li>
            </ul>
    </nav>

    <nav class="menudestaques">
            <ul>
                <li><a href="#" title="Praias de Guarapari">Praias</a></li>
                <li><a href="#" title="Turismo Rural">Turismo Rural</a></li>
                <li><a href="#" title="Horários de Ônibus">Horários de Ônibus</a></li>
                <li><a href="#" title="Telefones Úteis">Telefones Úteis</a></li>
                <li><a href="#" title="Onde Hospedar">Onde Hospedar</a></li>
                <li><a href="#" title="Onde Comer">Onde Comer</a></li>
                <li><a href="#" title="Parques Ecológicos">Parques Ecológicos</a></li>
                <li><a href="#" title="Imóveis">Imóveis</a></li>
                <li><a href="#" title="Taxi">Taxi</a></li>
            </ul>
        </nav>
    
asked by anonymous 21.06.2017 / 14:57

1 answer

0
Max-width é a largura máxima que o elemento pode ocupar.

Not that it will actually occupy ... But since it is 'set' for width;100% I think its parent element is restricting its width. See the devTools if this is it.

Or post his code too, if you're already hosted, if possible.

    
21.06.2017 / 15:01