2010-09-06 37 views
0

不妙我有在IE的CSS问题CSS在IE

本页面看起来火狐,Chrome,歌剧罚款....但在IE上的“日期栏”第一<li>栏上重叠

这里:http://www.animefushigi.com/latest-episodes

CSS是如下:

#content h2.other-posts { 
    height: 31px; 
    font-size:12px; 
    line-height: 31px; 
    background: #2c2b2b; 
    padding: 0 10px; 
    border: 1px solid #1b1b1b; 
    color: #888888; 
    margin-bottom:1px; 
} 

#content #other-posts { 
    list-style: none; 
    padding: 1px; 
    margin-top:15px; 
    margin-bottom:15px; 
    margin-left: 20px; 
} 
#other-posts li { 
    list-style: none; 
    background: #151515; 
    height: 30px; 
    line-height: 30px; 
    border-left: 1px solid #050505; 
    border-right: 1px solid #151515; 
    border-bottom: 1px solid #050505; 
    border-top:1px solid #0f0f0f; 
    margin-bottom: 1px; 
    padding: 0 10px; 
} 

#other-posts li a { 
    float: left; 
} 

WordPress的PHP文件如下:

<ul id="other-posts"> 

<?php 
$postslist = get_posts('numberposts=50&order=desc&orderby=date'); 
foreach ($postslist as $post) : setup_postdata($post); 
?> 
<?php the_date('', '<h2 class="other-posts">Added on ', '</h2>'); ?> 

<li><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"> 
    <?php the_title(); ?> 
    </a></li> 

<?php endforeach; ?> 
</ul> 

如何使这个浏览器全部友好?

+12

你没有IE浏览器的CSS问题,IE有CSS问题。 – 2010-09-06 04:21:54

+2

如此真实,但我能做什么?我的访问者中有40%使用IE :( – GreatestSwordsman 2010-09-06 06:12:11

+0

我的建议是要么执行全面的重置,要么使用我以前的* * margin:0; padding:0;}# – 2010-09-06 19:04:34

回答

0

尝试:的

#other-posts li { display:inline } 

而不是应用的显示规则 “李一”。这是您想要内联显示的列表项,而不是内部的链接。

编辑:非常抱歉。 dun知道'没有'来自哪里。

尝试删除浮动并指定列表的宽度或高度。

+0

好吧......我替换“#other-posts li a {float:left;}”WITH“#other-posts li {display:inline}”,然后从上面的CSS中删除“height:31px;”和“height:30px;”?试过,它结束了这样的:http://i54.tinypic.com/2s96l47.png – GreatestSwordsman 2010-09-06 06:28:26

+0

请dun删除这些高度价值.....而是指定一个特定的高度'其他职位李'和宽度100%,以便填充其父宽度 – loxxy 2010-09-06 07:51:02

+0

如果我删除浮动,并添加显示内联,它仍然看起来像我最后评论中的屏幕截图一样,如果我删除浮动,并保持原样,它看起来像罚款在Firefox,但在IE浏览器:http://i55.tinypic.com/9r0j84.jpg。(只有第一个日期标题显示) – GreatestSwordsman 2010-09-06 08:10:27

2

我建议你使用IE specific conditional评论。这样你就可以用IE特定的样式表来定位IE的特性。

<!--[if IE]><link rel="stylesheet" type="text/css" href="ie/specific/css.css"> <![endif]-->

+0

而我把它放在e IE css文件在这种情况下? – GreatestSwordsman 2010-09-06 18:19:38

+0

您的修复。哪些只会显示给IE浏览器。 – 2010-09-06 21:14:53

+0

这让我回到第一点,对于我遇到的这个特定问题,IE css修复程序是什么。没有人解决它。 – GreatestSwordsman 2010-09-07 02:00:26