网页是这样的:http://www.peliculadicto.tk/
每次调整窗口大小时,灰色灰色栏中的文本的位置:固定在上方,移到侧面。它永远不会保持居中。我该如何预防呢?
的HTML
<div class="headbar">
<h1 id="logo">
<a href="url" title="Ver peliculas de terror, de miedo, infantiles">Películas buenas</a>
</h1>
<div id="menu">
<ul>
<li><a href="url">Inicio</a></li>
<li><a href="url" class="drop">Peliculas</a></li>
<li><a href="url" class="drop">Estrenos</a></li>
<li><a href="url">Ranking</a></li><li><a href="url">Proximamente</a></li>
<li><a href="url">Más vistas</a></li>
</ul>
(search) <div id="uwpqsf_idsr"><form id="uwpqsffrom_641" method="get" action="url"><div class="uform_titlesr"></div><input type="hidden" name="unonce" value="4b52cced4e"><input type="hidden" name="uformid" value="641"><input type="hidden" name="s" value="uwpsfsearchtrg"><div class="uwpqsf_classsr"><input id="uwpqsf_id_keysr" type="text" name="skeyword" class="uwpqsftext" placeholder="Busca por título, actor, director, género..." value=""></div></form></div>
</div>
</div>
的CSS
.uwpqsf_classsr {
margin-bottom: 1px;
clear: both;
position: absolute;
bottom: 2.5px;
left: 57px;
}
.headbar {
position:fixed;
top: 0px;
left: 0px;
height: 42px;
width: 100%;
background-color: #9B9595;
background-image: -moz-linear-gradient(#B6AAAA,#000000);
background-image: -webkit-gradient(linear,0% 0,0% 100%,from(#B6AAAA),to(#000000));
background-image: -webkit-linear-gradient(rgb(177, 185, 185),rgb(73, 68, 73));
background-image: -o-linear-gradient(#B6AAAA,#000000);
border-bottom: 1px solid #A29A9A;
z-index: 3000;
opacity: 0.65;
}
#menu {
position: absolute;
min-width: 700px;
left: 221px;
}
#menu>ul>li {
float:left;
position:relative;
height:27px;
left:370px;
}
最佳答案
这是
#menu {
left: 221px;
}
做到了。