我有这个样式表
#navigation {
float: left;
white-space: nowrap;
font-size: 12px;
font-weight:bold;
}
#navigation ul {
list-style-type: none;
padding-top: 30px;
}
#navigation ul li {
float: left;
display: inline;
border-right: solid 1px #5f5f5f;
padding-right: 8px;
margin-right:8px;
}
这是 HTML
<div id="navigation" >
<ul dir="rtl">
<li>
<asp:LinkButton ID="LinkButtonRegister" runat="server" Visible="true" CausesValidation="False"
PostBackUrl="~/Register.aspx">הרשמה</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LinkButtonLogin" runat="server" Visible="true" CausesValidation="False">התחבר</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LinkButtonLogout" runat="server" Visible="false" OnClick="ButtonLogOut_Click"
CausesValidation="False">התנתק</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LinkButtonMyAccount" runat="server" Visible="false" CausesValidation="False"
PostBackUrl="~/MyAccount.aspx">אזור אישי</asp:LinkButton>
</li>
</ul>
</div>
如何将“#navigation ul li”“float”属性更改为“right”?
我可以使用 javascript-documnet.getelementbyid("navigation") 访问 div 导航,但不知道如何进入样式表中定义的每个 li 的样式