我在嘗試將菜單項對齊到右側,但它不起作用。我認爲這是因爲我使用了float:left來以正確的順序水平顯示菜單。我無法解決這個問題,所以我尋求幫助。無法將菜單項對齊到右側
我的問題的演示可以在http://elexode.nl
發現這是我的CSS:
/* RESET */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* OWN CONTENT */
body {
background:url('bg.jpg') fixed no-repeat;
font-family:Tahoma, Geneva, sans-serif;
}
#padding-inline {
padding:10px 0;
}
.container {
background:white;
}
.nav-menu {
height:47px;
}
.nav-menu ul {
line-height:47px;
float:left;
list-style-type:none;
}
.nav-menu li {
display:inline;
}
.nav-menu ul li a {
float:left;
text-decoration:none;
color:#5C5C5C;
padding:0 5px;
}
.nav-menu ul li a:hover {
color:#000000;
}
請顯示您的HTML代碼。 – Roopendra