我正在尝试重新创建Google主页,但我在排版右上方菜单中的项目时遇到了问题?
我尝试过text-align,但似乎没有做任何事情。
任何对此的帮助都会非常有用!
#wrapper {
position: absolute;
top: -100px;
left: 450px;
height: 500px;
width: 600px;
}
ul {
position: absolute;
right: 60px;
width: 400px;
height: 200px;
display: inline;
line-height: 10px;
list-style-type: none;
font-family: Arial, sans-serif;
margin-top: 30px;
}
li {
display: inline;
padding-right: 10px;
text-decoration: none;
font-size: 13px;
vertical-align: top;
}
a:link {
color: #000;
}
#picture_menu {
position: absolute;
right: 60px;
line-height: 40px;
width: 200px;
top: 10px;
}
#share {
border: 1px solid #dcdcdc;
color: #444!important;
background: -webkit-linear-gradient(top, #f5f5f5, #f1f1f1);
}
#header {
position: absolute;
top: 280px;
left: 210px;
background-image: url("images/logo.png");
height: 200px;
width: 400px;
background-repeat: no-repeat;
}
#searchbar {
position: absolute;
top: 400px;
left: 50px;
width: 600px;
height: 30px;
}
#microphone {
position: absolute;
top: 405px;
left: 625px;
background: url('images/microphone.png') no-repeat;
height: 50px;
width: 50px;
}
#search_button {
position: absolute;
top: 450px;
left: 230px;
border: 1px solid #dcdcdc;
border-color: rgba(0, 0, 0, 0.1);
color: #444!important;
font-size: 11px;
font-weight: bold;
padding: 10px;
background: -webkit-linear-gradient(top, #f5f5f5, #f1f1f1);
}
#lucky_button {
position: absolute;
top: 450px;
left: 350px;
border: 1px solid #dcdcdc;
border-color: rgba(0, 0, 0, 0.1);
color: #444!important;
font-size: 11px;
font-weight: bold;
padding: 10px;
background: -webkit-linear-gradient(top, #f5f5f5, #f1f1f1);
}
#tag_text {
background: url(images/mountains.png) no-repeat;
background-position: left;
padding-left: 40px;
position: absolute;
top: 500px;
left: 140px;
}
#tag_text span {
color: red;
}
#tag_text a:link {
color: blue;
}
p {
font-family: arial;
}
#footer {
position: absolute;
bottom: 0px;
width: 100%;
height: 30px;
background: #f2f2f2;
border-top: 1px solid #e4e4e4;
}

<ul>
<li>
<a href="#+Adam">+Adam</a>
</li>
<li>
<a href="#gmail">Gmail</a>
</li>
<li>
<a href="#images">Images</a>
</li>
<li>
<img src="http://i.imgur.com/e2Wyc6B.png">
</li>
<li>
<img src="http://i.imgur.com/0Xtg2MN.png">
</li>
<li>
<input type="button" value="Share" id="share" />
</li>
<li>
<img src="http://i.imgur.com/6ku5ORI.png">
</li>
</ul>
&#13;
答案 0 :(得分:2)
我为您的问题创建了一个JSFiddle,您可以在此处找到它:JSFiddle
我还将 li display: inline
更改为display: inline-block
,您可以尝试更改填充以获得正确的结果。