2011-05-13 122 views
0

我有一个博客在http://olisan.dk/blog/ - 你可以看到有一个28px高差距(边距)...在style.css中:CSS覆盖

margin-top: 0;也被设置为margin-top: 0 !important;没有这些工作根据需要 - 我可以看到FireBug中的margin-top: 28px !important,位于“博客#2”(!??)

任何帮助将不胜感激。

+0

这哪里是大的差距?我无法在Chrome中看到它? – 2011-05-13 08:02:53

+0

Safari说它的'padding-top:20px; margin-top:0px;'对我来说 – grc 2011-05-13 08:03:39

+0

FF4和IE8没有差距/余量。 – Till 2011-05-13 08:05:32

回答

1

行194 style.css中有以下

#topbody { 
    width: 939px; 
    margin-left: auto; 
    padding-top: 20px; 
    margin-right: auto; 
} 

更改为...

#topbody { 
    width: 939px; 
    margin-left: auto; 
    margin-right: auto; 
} 

将摆脱白色的差距在顶部。

2

由于我们都没有看到这种差距,我假设它是WordPress的管理栏,这是增加了差距的顶部。如果你没有在你的主题中使用它,你可以删除它。

wp_deregister_script('admin-bar'); 
wp_deregister_style('admin-bar'); 
remove_action('wp_footer','wp_admin_bar_render',1000); 

http://italkless.com/remove-wordpress-3-1-admin-bar-easily.html

0

..locate你的header.php,只是在wp_head电话后,下面的代码粘贴 <style type="text/css" media="screen"> html { margin-top: 0px !important; } * html body { margin-top: 0px !important; } </style>