wordpress实现宽大页脚
<div class="EBG">
<div class="Extra">
<!– Start Most Popular –>
<div class="Cols">
</div>
<!– End Most Popular –>
<!– Start Recent Comments –>
<div class="Cols">
</div>
<!– End Recent Comments –>
<!– Start Latest Entries –>
<div class="Cols">
</div>
<!– End Latest Entries –>
</div>
</div>
<?php
global $themedb;
$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,
comment_post_ID, comment_author, comment_date_gmt, comment_approved,
comment_type,comment_author_url,
SUBSTRING(comment_content,1,30) AS com_excerpt
FROM $themedb->comments
LEFT OUTER JOIN $themedb->posts ON ($themedb->comments.comment_post_ID =
$themedb->posts.ID)
WHERE comment_approved = '1' AND comment_type = '' AND
post_password = ''
ORDER BY comment_date_gmt DESC
LIMIT 10";
$comments = $themedb->get_results($sql);
$output = $pre_HTML;
$output .= "\n<ul>";
foreach ($comments as $comment) {
$output .= "\n<li>". "<p><a href=\"" . get_permalink($comment->ID) .
"#comment-" . $comment->comment_ID . "\" title=\"on " .
$comment->post_title . "\">" . strip_tags($comment->com_excerpt)
.'</a>('.strip_tags($comment->comment_author). ')</p></li>';
}
$output .= "\n</ul>";
$output .= $post_HTML;
echo $output;
?>
最里层几个容器外再加一个<div> ,用于清除Float
<div style="clear:both;height:1px;"></div>
实在没办法解决的细节兼容问题,可以用这个方法,用 !important来hack,对于IE6和FireFox测试可以正常显示,但IE7能够正确解释 !important,会导致页面没按要求显示,更好的办法是用 *+html
比如:
#example {color:#333} /*Moz*/
*html #example{color:#666} /*IE6*/
*+html #example{color:#999} /*IE7*/
那么在FireFox下字体颜色为#333,IE6下字体颜色为#666,IE7下字体颜色为#999
0 comments:
Post a Comment