我没有应用于此特定div的边距,没有浮动,更烦人的是它在不同的页面上工作。以下是css规则的代码:
#prizedraw-fliemore{
position: relative;
top: 164px;
left: -720px;
z-index: 3000;
}
当我使用position时绝对显示div:绝对但对我来说没用。我试过显示,可见性,没有尝试工作。有人可以帮帮我吗?感谢
页码为:
<div id="column-left-content">
<p class="height"><strong>Learn more about CAREFREE® 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®, 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® 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>
答案 0 :(得分:3)
我的猜测是IE6将它放在屏幕上,换句话说,你认为你相对的点不是IE6正在使用的点。
您是否可以通过暂时将上/下设置为0px并查看其显示位置来显示它?
编辑 - 只是在我的一个网站上查找了一些代码类似的代码。
我认为您需要在父div上设置position:relative,然后在子div上使用position:absolute和top / left。
答案 1 :(得分:1)
尝试在要定位的元素的父div上设置position: relative
。
这听起来很奇怪,因为通常一个绝对元素需要一个相对的父母。
但是我发现对于旧版本的IE,如果你有一个'消失的相对div',那么使它的'父亲亲属也可以解决你的一些问题。
答案 2 :(得分:0)
尝试删除{left:-720px;}并使用IE的条件样式表。也尝试给出相对于#prizedraw-fliemore
的父亲的位置