css3 - best way to position divs right css -


i need website top navegations tools.

it working i'm not confortable with. think maybe not right way these floating divs on right.

i need image on left , 2 itens on right of full width div.

so did:

<div id="menu">     <div id="logo">logo</div>     <div id="item">settings</div>     <div id="item">options</div> </div> 

and

#menu{     position:fixed;     width:100%;     height:50px;     background:#fff; }  #logo{     float:left;     right:30px; }  #item{     float:right;     right:30px;     margin-right:10px; } 

is ok float right , else or should change something? jsfiddle

flexbox...no need floats or positioning @ all....and items in right order.

#menu {    position: fixed;    width: 100%;    height: 50px;    background: #fff;    display: flex;  }  .logo {    margin-right: auto;  }  .item {    margin-right: 10px;  }
<div id=menu>    <div class="logo">logo</div>    <div class="item">settings</div>    <div class="item">options</div>  </div>


Comments