gpt4 book ai didi

html - 有时无缘无故我的 ul 位置较低

转载 作者:太空宇宙 更新时间:2023-11-03 19:20:57 25 4
gpt4 key购买 nike

这真的很奇怪。有时,当我重新加载时,它会显示它应该在的位置,如下所示: alt text

当我将颜色更改为橙​​色或蓝色时(没有测试任何其他颜色,那个 ul 被降低了。是什么原因?感谢您的帮助!

#topuserbar a
{
color:Orange;
}

alt text

这是完整的 CSS 和 HTML。

body
{
background-image: url('images/test.png');
background-repeat:repeat;
margin:0;
padding:0;
}

#header
{
background-image: url('images/headerBackground.png');
background-repeat:repeat;
width:auto;
}

#headershadow
{
background-color:Black;
min-height:2px;
}

#topuserbar
{
font-family:Georgia;
font-size:large;
float:right;
margin-top:35px;
margin-right:15px;
}

#topuserbar ul
{
}

#topuserbar li
{
display:inline;
margin-left:10px;
color:#fff;
}

#topuserbar .helpicon
{
position:relative;
top:4px;
left:2px;
}

#topuserbar a
{
color:Blue;
}

#topuserbar a:hover
{
color:Yellow;
}

/*****************BODY AREA*******************/

#body
{
border: 1px solid red;
min-height:800px;
width:auto;
margin-left:50px;
margin-right:50px;
}

#leftnavigation
{
border: 1px solid green;
min-height:500px;
float:left;
width:190px;
}

#contentarea
{
border:1px solid blue;
min-height:500px;
float:left;
width:300;
margin-left:5px;
margin-right:5px;
}

#advertisingarea
{
border:1px solid orange;
width:150px;
float:left;
min-height:500px;
}

.advert
{

}

<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>
<script src="../../Scripts/jquery-1.4.1.min.js"></script>
<script src="../../Scripts/jquery.tipTip.minified.js"></script>
<link href="../../Content/Site.css" rel="stylesheet" type="text/css" />
<link href="../../Content/tipTip.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="header">
<img src="../../Content/images/cumaviLogo.png" alt="Cumavi.com - Compras y ventas online en Bolivia!" />
<ul id="topuserbar">
<li>Bienvenidos, <span class="userSalute">Sergio!</span></li>
<li><a href="#">Mis Anuncios</a></li>
<li><a href="#">Perfil</a></li>
<li><a href="#">Ayuda</a><img class="helpicon" src="../../Content/images/helpIcon.png" alt="Help icon." width="20" height="20"/></li>
<li><a href="#">Cerrar Sesion</a></li>
</ul>
</div>
<div id="headershadow">
</div>
<div id="body">
<div id="leftnavigation"></div>
<div id="contentarea">sdfg<h1>asdasd</h1></div>
<div id="advertisingarea">
<div class="advert">
<img src="../../Content/images/advertImage.png" alt="Advert" />
</div>

<div class="advert">
<img src="../../Content/images/advertImage.png" alt="Advert" />
</div>

<div class="advert">
<img src="../../Content/images/advertImage.png" alt="Advert" />
</div>
</div>
</div>

<script type="text/javascript">
$(function () {
$(".someClass").tipTip();
});
</script>
<asp:ContentPlaceHolder ID="MainContent" runat="server" />
</body>
</html>

最佳答案

那么,您的菜单 (#topuserbar) 是 float 的,而容器不是。您可以更改您的 css 中的很多内容以设置适当的 float 布局...

- 或 -

只需更改设置菜单位置的方式,例如:

#topuserbar
{
font-family:Georgia;
font-size:large;
margin-top:35px;
margin-right:15px;
text-align: right;
}

...例如。

关于html - 有时无缘无故我的 ul 位置较低,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3935843/

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