我想在我的wordpress小部件中放一個html代碼,在我的頁面頂部顯示一些內容,這裏是代碼,但是最後一個浮點數是我想要放在左邊的電話號碼按鈕已經在右邊,它只是不能很好地工作,它會保持在按鈕旁邊,我很欣賞你是否能幫我解決什麼是錯的,爲什麼。Float left does not work
謝謝。
section ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: white;
}
section li {
float: right;
border-right: 5px solid;
border-color: white;
}
section li:last-child {
border-right: none;
}
section li p {
display: block;
color: black;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
section .button {
display: inline-block;
border-radius: 10px;
background-color: #955251;
border: none;
color: #FFFFFF;
text-align: center;
font-size: 16px;
width: 120px;
height: 45px;
transition: all 0.5s;
cursor: pointer;
margin: 5px;
align-items: center;
}
section .button span {
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.5s;
}
section .button span:after {
content: '\00bb';
position: absolute;
opacity: 0;
top: 0;
right: -20px;
transition: 0.5s;
}
section .ultopnav a:link:active,
a:visited:active {
color: white;
text-decoration: none;
cursor: auto;
}
section .ultopnav a:link {
text-decoration: none;
color: white;
}
section .ultopnav a:visited {
text-decoration: none;
color: white;
}
.ultopnav .floatleft {
color: black;
font-size: 14px;
}
<section>
<ul class="ultopnav">
<li><button class="button" style="vertical-align:middle"><span><a
href="http://www.chistagostar.com">خانه </a></span></button></li>
<li><button class="button" style="vertical-align:middle"><span><a
href="http://www.shop.chistagostar.com">صفحه اول فروشگاه </a></span>
</button></li>
<li>
<p class="floatleft" style="float: left;">تلفن: 77863967 - 021 | فکس: 77267261 - 021</p>
</li>
</ul>