Wordpress:管理栏下的奇怪空格 [英] Wordpress: Strange whitespace under Admin bar

查看:78
本文介绍了Wordpress:管理栏下的奇怪空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从头开始创建Wordpress主题,到目前为止一切进展顺利(这是我第一次).但是,在管理栏下面,我有18像素的空白,在Wordpress之前,它不在我的静态HTML页面中.参见下面的屏幕截图:

I'm creating a Wordpress theme from scratch, and so far everything's going well (it's my first time). However, underneath the admin bar I have 18 pixels of whitespace that wasn't in my static HTML page before Wordpress-ing it up. See below for a screenshot:

蓝色部分是标题,应与管理栏齐平.有什么明显的原因吗?

The blue part is the header, which should be flush with the admin bar. Is there any obvious reason for this happening?

推荐答案

我们在这里缺少信息.我们需要查看您的CSS才能获得准确的答案.

We're short on information here. We need to see your CSS for an accurate answer.

无论哪种方式,如果您注销,是否仍留有保证金?我很确定是这样.实际上,我认为您在容器/标题/任何位于顶部的元素上都具有边距顶部或填充顶部.

Either way, if you log out, is the margin still there? I'm pretty sure it is. I actually think you're having a margin-top or padding-top on your container/header/whatever element is on top.

如果没有边距,则您的CSS可能正在干扰管理栏.您可能会在与您的管理栏的类,标记或结构匹配的元素上设置一个底距.

If there is no margin, then your CSS is probably interfering with the admin bar. You probably set a margin-bottom on an element that matches either your class, tag or structure of the admin bar.

如果您仍然看不到任何内容,则很有可能与浏览器相关.如果其他解决方案无效,请尝试添加 CSS重置.

If you still don't see anything, there is a very slim chance that it could be browser-related. If the other solutions didn't work, try adding a CSS reset.

这篇关于Wordpress:管理栏下的奇怪空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆