CSS:
#header_bar
{
background-repeat: repeat-x;
width:100%;
}
.langpnl
{
float:right;
padding-top: 2px;
padding-right: 0px;
position:relative;
width:45px;
height:16px;
font-size:7pt;
}
#imgLogo
{
width: 156px;
height: 42px;
}
<!-- header.ascx -->
<div id="header_bar">
<div align="center">
<a href="<%=AppPath%>" target="_parent" >
<img id="imgLogo" runat="server" src="~/images/UI/logo.jpg" border="0" /></a>
<asp:DropDownList ID="ddlLanguage" class="langpnl" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlLanguage_SelectedIndexChanged">
<asp:ListItem Value="">EN</asp:ListItem>
<asp:ListItem Value="es-ES">ES</asp:ListItem>
</asp:DropDownList>
</div>
</div>
<!-- /header.ascx -->
我試圖將中心的圖像和下拉框對齊到右上角。目前我能夠做到這一點,但圖片左側略顯。如果我只刪除下拉框,那麼它就會在中心。 在系統瀏覽器中,你無法弄清楚,但這是一個移動網站&在移動視圖中,你可以找出差異。準確地將徽標對準中心
align =「center」已被棄用一段時間了:http://www.w3schools.com/tags/att_div_align.asp –
這是一個客戶端問題。請顯示您的結果HTML,而不是您的ASP代碼。 –