gpt4 book ai didi

html - 为什么当我使用位置 :relative in IE6? 时我的 div 消失了

转载 作者:搜寻专家 更新时间:2023-10-31 08:22:20 24 4
gpt4 key购买 nike

我没有对这个特定的 div 应用边距,没有 float ,更烦人的是它在不同的页面上工作。以下是 css 规则的代码:

#prizedraw-fliemore{
position: relative;
top: 164px;
left: -720px;
z-index: 3000;
}

当我使用 position:absolute 时,div 出现了,但这对我来说毫无用处。我已经尝试过显示、可见性,但我尝试的任何方法都不起作用。有人可以帮我吗?谢谢

页面代码为:

<div id="column-left-content"> 
<p class="height"><strong>Learn more about CAREFREE&reg; pantyliners and discover how they can help you feeling clean, fresh and protected all day long.</strong></p>
</div>

<div id="column-right-content">
<p><strong>Free to be me</strong> has been put together for you by the thoughtful makers of CAREFREE&reg;, who design feminine hygiene products to give you all the protection you need.<br /><br />

Now that you've reached puberty, there are things you need to know that you might not know already. CAREFREE&reg; has the answers to some of the questions you might just be asking...
</p>
</div>

<div id="car-boxes">

<div class="car-nav">
<div class="container">
<a class='example5' href="lb/why.html" style="border:none;" rel="group"><img src="images/carefree/pantyliners.png" class="bw" style="border:none;" /></a>
<img src="images/carefree/pantyliners-y.png" class="colour" alt="" />
</div>
</div>

<div class="car-nav">
<div class="container">
<a class='example5' href="lb/discharge.html" style="border:none;" rel="group"><img src="images/carefree/discharge.png" class="bw" style="border:none;" /></a>
<img src="images/carefree/discharge-y.png" class="colour" alt="" />
</div>
</div>
<br />
<div class="car-nav">
<div class="container">
<a class='example5' href="lb/difference.html" style="border:none;" rel="group"><img src="images/carefree/difference.png" class="bw" style="border:none;" /></a>
<img src="images/carefree/difference-y.png" class="colour" alt="" />
</div>
</div>

<div class="car-nav">
<div class="container">
<a class='example1' href="lb/right.html" style="border:none;" rel="group"><img src="images/carefree/right.png" class="bw" style="border:none;" /></a>
<img src="images/carefree/right-y.png" class="colour" alt="" />
</div>
</div>
</div>

<div id="prizedraw-car">
<a href="enter.php"><img src="images/prizedraw.png" alt="Read More" /></a>
</div>

</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-2268991-20");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body>
</html>

最佳答案

我的猜测是 IE6 将它定位在屏幕之外,换句话说,您认为相对的点并不是 IE6 使用的点。

是否可以通过临时将 top/left 设置为 0px 并查看它显示的位置来使其显示?

编辑 - 刚刚在我的一个网站上查找了一些执行类似操作的代码。

我认为您需要在父 div 上设置 position:relative,然后在子 div 上使用 position:absolute 和 top/left。

关于html - 为什么当我使用位置 :relative in IE6? 时我的 div 消失了,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2206670/

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