gpt4 book ai didi

html - 调整窗口大小时,div 内的文本向右或向左移动

转载 作者:行者123 更新时间:2023-11-28 11:20:24 24 4
gpt4 key购买 nike

网页是这样的: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;
}

就是这样。

关于html - 调整窗口大小时,div 内的文本向右或向左移动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21570848/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com