html - 删除 Div 元素之间的间隙

标签 html css wordpress

我在两个 div 元素之间出现了一个空白 col3-2the_content 我一直无法解析。

enter image description here

Visit site here 您可以看到图像和绿色元素之间的白色间隙。

HTML - PHP:

    <div id="imageslider" class="clearfix">
        <?php echo do_shortcode('[advps-slideshow optset="1"]'); ?>
    </div>
        <div class="col3-2">
            <div id="content" class="clearfix">
                <?php 
                    $args = array( 'pagename' => 'home' );
                    $the_query = new WP_Query( $args );
    while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
                        <div class="the_content">
                        <?php the_content(); ?>
<?php edit_post_link(__('Click to edit this content','themify'), '[', ']'); ?>
                    </div>
                <?php endwhile; wp_reset_query();?>
            </div>
        </div>

CSS:

.col3-2
{
    float: left;
    margin-left: 0%;
}
.col3-2 {
    width: 100%;
    font-family: 'Titillium Web', sans-serif;
}
.col3-2 h1 {
    margin-right: 20px;
    font-size:300%;
}
.the_content{
    display: none;
}
#content {
    float: left;
    padding: 0 0 0%;
    width: 100%;
}

最佳答案

问题在于一个无关的<p>标 checkout 现在 div.the_content标签:

<div class="col3-2">
        <div id="content" class="clearfix">
            <div class="the_content">
                <p></p>
                ...

看起来您是从其他地方提取的,因此编辑您发布的代码可能不会有太大帮助。只需删除 <p></p>来自内容的来源。

关于html - 删除 Div 元素之间的间隙,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34387979/

相关文章:

php - 将图标添加到自定义 WooCommerce 支付网关

php - 如何正确实现字距调整生成的代码

javascript - 在 JQuery 验证中允许数字和逗号?

html - 我的搜索栏行为异常

javascript - 如何使用 JavaScript 设置当前时间日期时间本地值

c# - 在 C# 中显示带有滚动条的 gridview?

javascript - 随着鼠标位置的变化改变背景颜色

javascript - 获取下拉列表中选定的值

css - 按下按钮后如何更改 styleurls 链接并保持这种状态

php - Wordpress ACF get_field() 不返回值