無法讓我的圖像居中,而與我的圖標保持在同一水平面上。如何將元素居中在div中,同時保持與另一個元素處於同一水平面上?
HTML
<div class="smalltop w3-top">
<span class="w3-opennav w3-xlarge" onclick="w3_open()"><i id="menui" class="material-icons w3-xxlarge">menu</i></span>
<a href="#"><img id="smalllogo" src="img/navlogo-invert.jpg"></a>
</div>
CSS
#smalllogo {
max-height: 50px;
width: auto;
display: block;
margin: 0 auto;
border: 5px solid;
margin-top: 5px;
}
#menui {
left: 0;
}
.smalltop {
background-color: #FFF;
list-style-type: none;
margin: 0 auto;
}
https://jsfiddle.net/pzLbruhx/