简体   繁体   English

两个div之间的神秘空白

[英]Mysterious white space between two divs

I can't figure out WHY there is a mysterious space appearing on the live version of my site but NOT on my local version. 我不知道为什么在网站的实时版本中会出现一个神秘的空间,而在本地版本中却没有。

Visit this site . 访问此站点 Notice there's a gap above the div containing "imadake is an izakaya" which reveals the blue/white stripes of the background. 请注意,在div上方有一个间隙,其中包含“ imadake is izakaya”,可显示背景的蓝/白条纹。 On my local version of the site (with all the same files!) there is not gap. 在我的本地版本的网站上(具有相同的文件!),没有间隙。

I've tried multiple browsers and it consistently appears online, but not locally. 我尝试了多种浏览器,它始终在线显示,但不在本地显示。

Help! 救命!

There's a <p></p> above that title you recall. 您记得该标题上方有一个<p></p> Check it out , maybe you're doing some kind of loop and the first iteration places an empty paragraph. 检查一下,也许您正在执行某种循环,并且第一次迭代放置了一个空段落。

There's a paragraph opening and closing at the top of the entry-content div with nothing in it. 条目内容div的顶部有一个开头和结尾处没有任何内容。 Delete this and that should sort it. 删除它,应该对其进行排序。

Your divs may not be floating. 您的div可能没有浮动。 Try placing a float left on each and you should see the strange gap go away. 尝试在每个浮子上放一个浮子,您会看到奇怪的缝隙消失了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM