IE和Firefox中的网站CSS不同

问题描述 投票:0回答:1

我有一个Wordpress网站,我从我购买的模板设计。对模板的支持有点难以获得,所以我决定在这里问一下,也许有人知道答案。

网站布局在Chrome中看起来不错,但在IE和Firefox最新版本中很奇怪。

这是Chrome正常布局:

http://img687.imageshack.us/img687/2023/screenshot20120731at115.png

这是在Firefox / IE中:

http://img823.imageshack.us/img823/2023/screenshot20120731at115.png

该网站的代码分布在php文件中..但这是Header.php的开头

    <?php
/**
 * @package WordPress
 * @subpackage ***  */ 
?>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html <?php language_attributes(); ?>> <!--<![endif]-->
<head>


<meta charset="<?php bloginfo( 'charset' ); ?>" />

<meta name="viewport" content="width=device-width" />


<?php if(get_option('header_favicon')) { ?>
<link rel="shortcut icon" href="<?php echo get_option('header_favicon'); ?>" />
<?php } ?>
<title><?php if(is_front_page()) { bloginfo('name'); } else { wp_title( '', true, 'right' ); }?></title>
<?php if(get_option('rss_feed')) { ?>
<link rel="alternate" type="application/rss+xml" title="<?php echo get_option('rss_title'); ?>" href="<?php echo get_option('rss_feed'); ?>" />
<?php }

知道什么能解决这个问题吗?

html css html5 css3 cross-browser
1个回答
0
投票

在CSS中找到此规则(第115行)

.skinset-header, .skinset-footer, .skinset-main.nv-skin {
background: none repeat scroll 0 0 transparent !important;
border: 0.7px solid #E9E9E9 !important;
}

删除border属性。

.skinset-header, .skinset-footer, .skinset-main.nv-skin {
background: none repeat scroll 0 0 transparent !important;
}

然后你在FF上得到一条蓝线:

.skinset-background .accordionhead.ui-accordion-content-active, .skinset-background .ui-state-active, .skinset-background #primary-wrapper.nv-dark .ui-state-active, .skinset-background #nv-tabs ul li ul, #primary-wrapper .skinset-background.sub-menu, .skinset-background span.menu-highlight, .skinset-background #primary-wrapper .skinset-header.nv-skin, .skinset-background div.item-list-tabs ul li.selected, .skinset-background div.item-list-tabs ul li.current, .skinset-background div.item-list-tabs ul li.new, .skinset-background #topic-post-list, .skinset-background table.forum, .skinset-background table.bbp-topics, .skinset-background table.bbp-replies, .skinset-background table.bbp-forums, .skinset-background ul#activity-stream {
border-top: 2px solid #61C4FD;
}

将来在FireFox中使用Firebug - http://getfirebug.com/downloads/,非常有用

© www.soinside.com 2019 - 2024. All rights reserved.