2
HTML
<nav id="menu-navigation">
<ul>
<li>
<span class="icon building"></span>
<a href="#" title="">LINK UM</a>
</li>
<li>
<span class="icon services"></span>
<a href="#" title="">LINK UM</a>
</li>
<li>
<span class="icon portfolio"></span>
<a href="#" title="">LINK UM</a>
</li>
<li>
<span class="icon clients"></span>
<a href="#" title="">LINK UM</a>
</li>
<li>
<span class="icon testimony"></span>
<a href="#" title="">LINK UM</a>
</li>
<li>
<span class="icon location"></span>
<a href="#" title="">LINK UM</a>
</li>
<li>
<span class="icon contact"></span>
<a href="#" title="">LINK UM</a>
</li>
<li>
<span class="icon work-with-us"></span>
<a href="#" title="">LINK UM</a>
</li>
<li class="logotipo">
Imagem
</li>
</ul>
</html>
**CSS (LESS) **
// Menu
nav#menu-navigation {
position: absolute;
left: 0px;
top: 0;
margin: auto;
width: 100%;
max-width: 100%;
height: 160px;
z-index: 4;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
background-color: transparent;
ul {
position: absolute;
left: 0px;
top: 0;
right: 0px;
bottom: 0;
margin: auto;
height: 118px;
width: 1280px;
font-size: 0px; // Espaço em Branco entre os Li's
text-align: center;
li {
background-color: #7d858b;
display: inline-block;
border-top: none;
border-bottom: none;
line-height: 45px;
height: 45px;
text-align: center;
text-indent: 0;
padding: 0px 15px;
vertical-align: bottom;
transition: all 1s ease;
&: before {
content: none;
}
&:hover:not(.logotipo) {
border-top: 1px inset #FFF;
border-bottom: 1px inset #FFF;
a {
color: #ef9c2b;
}
}
a {
transition: all 1s ease;
color: #FFF;
font-size: 14px;
}
&.welcome,
&.menu {
display: none;
}
&.logotipo {
display: inline-block;
background-color: transparent;
height: 118px;
line-height: 118px;
}
span.icon {
display: none;
}
span.pipeline {
display: block;
}
}
}
}
In that code above, my last LI is the LOGO. The gray bar to your right is to continue (I put manually to show what I need).
I managed to make the MENU until the logo. But I need this gray bar to the right, and it has to be 100%, IE, it should start from there after the letter O of SOON and end in the corner of the window no matter the resolution.
I even put a DIV with position:absolute
to make the gray bar, but depending on the resolution, goes up on the LOGO, obviously.
I didn’t put the nav#menu-navigation
all gray because the LOGO area is transparent, because it has a slider in the background. So the gray bar has to come from the left stop before the LOGO and continue after until the end.
How can I do ?
My biggest problem is how to make the gray bar on the right that she stay right until the logo.
Note: The LOGO part is transparent. The
ul
may not have background color.OBS 2: It has to be like in the image.
Your
ul
has to be a block with 100% width and the color applied to it, so it works with theli
's. https://jsfiddle.net/m745hmrx/– KaduAmaral
@Kaduamaral, thank you for your help. But it seems you didn’t even read what I wrote - ... the LOGO area is transparent. Can’t be white, can’t have color. And if you put
transparent
he picks up the color oful
at the bottom.– Diego Souza
So Diego, there’s no way you can do this with just CSS. You could try using javascript or a table, but it’s something that would take a lot of work, it’s much easier for you to set the background
li.logotipo
with the same background color of the site.– KaduAmaral
No, it’s not easier. On the same line where ...the LOGO area is transparent continues ,why has a slider on the bottom..
– Diego Souza
Wrong way to do it, but you don’t need Javascript: https://jsfiddle.net/Lybc6nf5/
– KaduAmaral
It has an HTML kit called "Traingames Webkit", comes with a menu bar and 5 more elements. <a href="https://traingamesofficial.github.io/traingames.github.io/webkit.html">Webkit</a> This is the version <em>free</em>, the version <em>Professional</em> (with + of 30 elements) has here: <a href="http://producto.mercadolivre.com.br/MLB-902124661-traingameswebkit-pro-_JM">Pro Webkit</a>. I think free view is already good for what you want, just have to modify the stylesheet a little bit, like the source, background-color,.
– Developer