I am having a CSS problem in IE
This page looks fine in Firefox, chrome, opera....but on IE the "date bar" overlaps on the first <li>
bar
Here : http://www.animefushigi.com/latest-episodes
CSS is as followed :
#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;
}
The Wordpress PHP file is as followed :
<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>
How can I make this all-browser friendly?
I would suggest you use IE specific conditional comments. That way you can target IE idiosyncrasies, with an IE specific stylesheet.
<!--[if IE]><link rel="stylesheet" type="text/css" href="ie/specific/css.css"> <![endif]-->
try:
#other-posts li { display:inline }
instead of applying the display rule to "li a". It's the list item that you want displayed inline, not the links inside.
EDIT : Extremely sorry. dun know where that 'without' came from.
Try Removing the float and specifying a width or height of the list.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.