我有三個社交媒體按鈕與浮動右所有按鈕有不同的寬度。標題右側還有一個h1,右側浮動。但是我的社交媒體按鈕右側浮動,不是浮動的,但它位於標題的左側。帶浮點的標頭項目right = float left如何?
/*nieuwsbrief*/
#zoekveldandsocial > h1{
color: white;
float: right;
background-color: #e8b215;
font-size: 12px;
height: 15px;
padding: 13px;
text-align: center;
width: 100px;
}
/*facebook*/
#social > img:first-of-type{
width: 2%;
}
/*twitter*/
#social >img:nth-of-type(2){
width: 2%;
}
/*linkedin*/
#social > img:nth-of-type(3){
width: 2.1%;
}
#social{
float: right;
}
<div id="zoekveldandsocial">
<h1>Nieuwsbrief</h1>
<div id="social">
<img src="img/facebook.png" alt="facebook" />
<img src="img/twitter.png" alt="twitter" />
<img src="img/linkedin.png" alt="linkedin" />
</div>
https://jsfiddle.net/27zs3nhn/
https://jsfiddle.net/Paulie_D/27zs3nhn/1/ –