2009-11-30 83 views
0

此页面http://winteradagency.com/Arvin/incentives/lenders.htm在除IE6之外的所有浏览器中看起来都不错。出现问题的是那些需要放在中心图片顶部的大字,说“贷方扣除”。在IE6中,他们正在向右移动,导致浏览器窗口进行水平滚动。绝对定位的标记在IE6中不起作用

我需要使用这些单词的2个不同实例来创建人造阴影外观。所以一个是在另一个的顶部,而在两个方向都是一个像素。

我使用这个网站码:

<div id="centerInc"> 
    <p class="centerAlign3">Deductions for Lenders</p> 
    <p class="centerAlign2">Deductions for Lenders</p> 
</div><!--end center image div--> 

,这里是从styles.css的网站上的CSS:

#container #centerInc { 
background-image: url(images/IncCenter.jpg); 
height: 183px; 
width: 875px; 
margin-top: 160px; 
float: left; 
font: bold 2.6em Georgia, "Times New Roman", Times, serif; 
color: #FFF; 
background-repeat: no-repeat; 
text-align: right; 
position: absolute; 
} 

.centerAlign2 { 
font: normal 1.15em Georgia, "Times New Roman", Times, serif; 
color: #FFF; 
position: absolute; 
width: 860px; 
margin-top: 115px; 
} 
.centerAlign3 { 
font: normal 1.15em Georgia, "Times New Roman", Times, serif; 
color: #000; 
position: absolute; 
width: 861px; 
margin-top: 114px; 
} 

任何想法,将不胜感激。我仍然是一个真正的新秀。 谢谢!

回答

0

可以尝试使用“溢出:隐藏”在centerInc

我将通过创建一个GIF或JPEG解决这个问题。在ie9或firefox 11或新浏览器0.5中不起作用只是个时间问题。

+0

是的,我已经决定忘记尝试在图片上添加文字,并且仅仅使每个图片都已经包含文字。 – Drea 2009-11-30 20:23:15

0

随着position: absolute我肯定会指定x/y位置(即topleft),我想我没有看到你这样做。就目前情况而言,您可以让浏览器自由决定在哪些位置放置这些DIV。

+0

我看不出如何做x/y定位,除了在背景图像的情况下。 (我正在使用Dreamweaver),但是,我已经决定忘记将图像添加到图像顶部,并且只是将每个图像与已经存在的文本进行匹配。 – Drea 2009-11-30 20:13:14

0

清除您的花车:Clearing a float container without source markup

你已经有了一个额外的</div>标签,可能另一个问题,以及其他一些错误: [Invalid] Markup Validation of winteradagency.com/Arvin/incentives/lenders.htm - W3C Markup Validator

您可能还需要一个特定的IE6的样式表:CSS - Conditional comments

+0

感谢您的帮助。链接到CSS条件评论将在未来帮助我。和标记验证器的链接帮助我看到了一些其他的错误。 我已经决定忘记试图在图像上添加文本,只是使每个单独的图像与文本已经在它。 – Drea 2009-11-30 20:12:26