duanmei1930 2012-12-22 02:18
浏览 37
已采纳

WordPress身体边缘问题

So, I'm making a custom WordPress theme, which you can see at http://staging.gencormortgage.com/sandbox/wordpress/. It displays properly in all browsers but Google Chrome (and possibly Safari, can't test that one) - I want the lines at the top to be all the way at the top of the screen. I've tried body{ margin-top:0 auto; }, but this only works on Opera and Firefox, but has a 28px blank space at the top in Google Chrome. If I change the margin-top to -28px, it doesn't display properly in Opera and Firefox. How can I overcome this browser compatibility issue?

  • 写回答

1条回答 默认 最新

  • doujin4031 2012-12-22 02:21
    关注

    That is the admin bar.

    You can disable it by putting the following in funcitons.php

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

    By the way it's only displayed when you are logged in.

    Alternatively there is a lite plugin you can download to hide it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了