我有一個菜單欄,這是我的web應用程序的標題,我已經採取了一個標籤來綁定登錄的用戶名和一個按鈕退出問題是我的標籤和按鈕應該在菜單欄中,只是他們在菜單中,但按鈕註銷可以清楚地看到,它是從菜單分離我需要將按鈕放置在右側和標籤在按鈕的左側。我可以如何做到這一點。如何將按鈕放在菜單欄和按鈕的左側標籤
下面是我的CSS代碼
/*---Reset----*/
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,textarea,p,block
{
padding: 0;
margin: 0;
}
/*body*/
body {
background-color:rgb(237,237,237);
font-family:"Arial",Helvetica,sans-serif;
font-size: 12px;
}
/*Page*/
.wrapper {
width:1430px;
margin:auto;
}
/*Home Page*/
.content {
width:100%;
background-color:rgb(254,254,254);
border:1px solid rgb(224,224,224);
border-radius:5px 5px 5px 5px;
float:left;
margin-top:8px;
margin-bottom:8px;
min-height:600px;
}
/*Menu*/
.menu {
background-color: rgb(10,110,178);
width: 100%;
margin: 0px 0px 10px;
padding: 0px;
height: 40px;
color: rgb(243,243,243);
border-radius: 5px 0 0 5px;
}
.navigation_first_item {
border-left: 0px;
border-radius: 5px 0 0 5px;
}
.navitem_s {
float: left;
border-right: 1px solid rgb(10,85,125);
border-left: 1px solid rgb(67,153,200);
height: 40px;
background-color: rgb(14,79,114);
}
.menu ul {
}
.menu ul li {
float:left;
display:block;
list-style:none;
border-right:1px solid rgb(10,85,125);
border-left:1px solid rgb(67,153,200);
}
.menu ul li.navigation_first_item:hover {
border-radius:5px 0px 0px 5px;
}
.menu ul li a {
font-size:13px;
font-weight:bold;
line-height:40px;
padding:8px 20px;
color:rgb(255,255,255);
text-decoration:none;
}
.menu ul li:hover {
background-color: rgb(14,79,114);
border-right: 1px solid rgb(14,89,130);
}
.clear {
clear: both;
}
/*Footer*/
.footer {
height: 50px;
background-color: rgb(10,110,178);
color: rgb(255,255,255);
border-radius: 5px 5px 5px 5px;
}
.footer h2 {
padding: 15px;
text-align: center;
}
請註明我的答案是正確的。我完全按照您的要求做了,並且願意在未來再次爲您提供幫助。謝謝 – gmonz