<div class="littleheader"><div class="logo"><a HREF="index.php"><img class="fleft" src="graphics/little-logo.png" alt="Cliproid" ></a></div>
<div class="navbuttons">
<div class="navigations">
<a class="nav">test</a>
</div>
<br/><br/>
</div>
</div>
和样式:
div.littleheader
{
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#aadbba), to(#009933));
background: -moz-linear-gradient(top, #aadbba, #009933);
padding: 0.5em;
color: white;
clear: left;
z-index: 1;
height: 30px;
}
.logo
{
margin-left: 100px;
vertical-align: middle;
}
div.navbuttons{
float: left;
text-align: left;
margin-left: 50px;
}
.fleft
{
float: left;
}
.navigations
{
float: left;
vertical-align: middle;
margin-left: 10px;
}
a.nav
{
vertical-align: middle;
color: white;
}
答案 0 :(得分:1)
我的第一个想法是改变a.nav
:
a.nav {
display: block;
float: right;
line-height: 120px; /* just an example, line-height causes vertically aligned */
}
从那里拿走。
你必须正确地浮动你的整个导航栏和其他东西,但这是基本的开始。