简体   繁体   English

div内的表格? IE7兼容性问题-寻找资源来扩展有关如何处理IE7问题的知识

[英]Tables inside a div? IE7 compatability issue - looking for a resource to expand knowledge on how to deal with IE7 problems

I'm currently doing the redesign for this site: http://www.palosverdes.com/rpv2012/ and have run into a problem with repeating a gradient inside a div (cnews). 我目前正在对该网站进行重新设计: http : //www.palosverdes.com/rpv2012/,并且在div(cnews)中重复渐变遇到了问题。 The issue is that when the gradient is repeated on IE7, there is a color problem. 问题是,当在IE7上重复渐变时,会出现颜色问题。 It almost seems as if the blue on the image is lightened somehow. 图像上的蓝色似乎几乎以某种方式变亮了。 When I set the attribute to no-repeat, I don't get the rounded edges effect I'd like the achieve. 当我将该属性设置为no-repeat时,没有获得想要的圆角效果。

Here's the code in question: 这是有问题的代码:

<div class="box-noshadow" id="cnews">
<div id="spotlight">
</div><!--spotlight-->
<div onmouseout="document.getElementById('stop').start();" onmouseover="document.getElementById('stop').stop();" id="stopmarquee">
<div align="center" id="toptitle">
CITY NEWS &amp; EVENTS
</div><!--toptitle-->
<div id="cnewscontainer">
<iframe align="middle" width="400px" scrolling="no" height="100px" frameborder="0" src="scroll_file_b/break2.cfm"></iframe>
</div><!--cnewscontainer-->
</div><!--stopmarquee-->
</div><!--cnews-->

and the relevant CSS: 以及相关的CSS:

#cnews {
width: 100%;
background-image:url(images/cnews-back.jpg);
float: left;
padding: 5px;
font-family:Arial, Helvetica, sans-serif;
overflow:hidden;}

#spotlight {
width: 50%;
height: 200px;
background-color: yellow;
float: right;
padding: 5px;}

.box {-moz-border-radius: 15px; /* Firefox */
-webkit-border-radius: 15px; /* Safari and Chrome */
border-radius: 15px; /* Opera 10.5+, future browsers, and now also Internet Explorer 6+ using IE-CSS3 */
-moz-box-shadow: 10px 10px 20px #000; /* Firefox */
-webkit-box-shadow: 10px 10px 20px #000; /* Safari and Chrome */
box-shadow: 10px 10px 20px #000; /* Opera 10.5+, future browsers and IE6+ using IE-CSS3 */
behavior: url(PIE.htc); /* This lets IE know to call the script on all elements which get the 'box' class */}

What solution can I pursue that will allow this to still render correctly in modern browsers as well? 我可以寻求什么解决方案,使它仍然可以在现代浏览器中正确呈现? Should I use IE7-specific CSS? 我应该使用IE7专用的CSS吗?

Also, where can I look to see what HTML/CSS ie7 has problems interpreting compared to modern browsers? 另外,与现代浏览器相比,我在哪里可以看到哪些HTML / CSS ie7在解释方面存在问题?

Your width:50% on your stopmarquee is causing that item to drop down lower in IE7, instead of rising up next to the right floated spotlight div. 您在stopmarquee上的width:50%导致该项目在IE7中下降得更低,而不是在右侧浮动的spotlight div旁边上升。 This is causing your cnews container to expand down further, which is then causing your background image to repeat in the 'y' direction (like 3rror404 stated in his comment). 这使您的cnews容器进一步向下扩展,然后使您的背景图片沿“ y”方向重复(例如他的评论中所述的3rror404)。

Your background image itself has a color shift within it, so that the top of the image is lighter than the lower part of the image, thus you are getting a lighter look when the image repeats in the 'y' direction. 背景图像本身内部具有颜色偏移,因此图像的顶部要比图像的下部浅,因此,当图像在“ y”方向上重复时,您的外观会更浅。

You can correct the stopmarquee position by changing to width: 49% (which I don't think will hurt your layout), and that will probably resolve your issue. 您可以通过更改为width: 49% (我认为这不会损害您的布局)来更正stopmarquee位置,这很可能会解决您的问题。 Otherwise, make the background image a solid color so that a repeat does not cause the issue. 否则,请使背景图像为纯色,以便重复不会导致此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM