I tried to create a menu with html and css without any framework, I used float:left
to put the image with the logo on the left and rest of the images that are anchors should I want to be able to find the right one, but when I use float:right
I did not get the expected result, could you help me identify the problem?
Note:
It does not have to be with float
that's the way I tried. It is worth remembering that the menu accompanies the scroll of the site.
Here is the code I tried:
#wrap {
width:calc(100% - 1px);
}
body {
font-family: 'Open Sans';
padding:0;
margin:0;
}
body a {
text-decoration:none;
}
body img {
border: none;
}
.menu {
position: fixed;
top: 0;
height: 80px;
z-index: 1000;
background-color: #f2f2f2;
}
.menu img {
float:left;
margin: 15px 0px 0px 20px;
height: 70%;
}
.menu .menu-link {
float:right;
}
.menu .menu-link a {
line-height: 100px;
color: #00497e;
text-transform:uppercase;
font-size: 11pt;
}
.menu .menu-link a:hover {
border: 0;
background-color: #e20613;
color: white;
}
<div id="wrap">
<div class="menu">
<a href="#">
<img alt="Logo" src="http://inpartsaudebi.com.br/assets/img/brand-inpart.png"></a><divclass="menu-link">
<a href="#about" id="menuAbout">
<img src="https://static.dentaldepartures.com/places/fa-building-o.png"style="width:5%;" />
Empresa
</a>
<a href="#users" id="menuUser">
<img src="http://alumnes.org/wp-content/uploads/2017/06/fa-user-circle-o-c0a2bd7a.png"style="width:5%;" />
Usuário
</a>
</div>
</div>
</div>