[英]Can anyone tell me which piece of my CSS is causing a gap?
Within my Wordpress site I have a custom written PHP search. 在我的Wordpress网站中,我有一个自定义的书面PHP搜索。 It appears within the Content section of specific pages via 'include' so it's a separate file. 它通过“ include”出现在特定页面的“内容”部分中,因此它是一个单独的文件。
http://www.glutenfreeireland.com/accommodation/find-accommodation/ http://www.glutenfreeireland.com/accommodation/find-accommodation/
The entire code for search and results appear within the DIV .wheretoeatsearchwrapper. 用于搜索和结果的整个代码显示在DIV .wheretoeatsearchwrapper中。 Unfortunately a large gap appears between the text "Step 1: Choose a Location:" and the first SELECT box. 不幸的是,文本“步骤1:选择位置:”与第一个“选择”框之间出现了很大的距离。 It is caused by the adverts on the right, which when removed, fix the problem. 这是由右侧的广告引起的,将其删除后即可解决问题。 I understood the class wheretoeatsearchwrapper kept everything within that DIV, ie objects either side of wheretoeatsearchwrapper wouldn't affect content inside it? 我知道在哪里wheretoeatsearchwrapper将所有内容都保留在该DIV中,即wheretoeatsearchwrapper两侧的对象都不会影响其中的内容?
This is the applicable CSS: 这是适用的CSS:
.wheretoeatsearchwrapper { /*max-width: 490px;*/ clear: none; margin: 0; padding-left: 10px; } .wheretoeatsearchwrapper h1,h2,h3,h4,h5,h6 { display: inline; } .searchlocation select { font-size: 95%; margin: 0.2em; float: left; clear: both; } .steps { color: #339933; font-weight: bold; } .searchvenuetype { font-size: 95%; margin: 4px; float: left; clear: none; }
It's the clear:both;
很clear:both;
on the searchlocation select
element. 在searchlocation select
元素上。
.searchlocation select {
font-size: 95%;
margin: 0.2em;
float: left;
clear: both; // Remove this
}
Remove clear: both for .searchlocation select 删除清除:对于.searchlocation选择
.searchlocation select {
font-size: 95%;
margin: 0.2em;
float: left;
/*clear: both;*/
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.