Ash*_*her 0 html css wordpress
我在两个div元素之间出现了一个空白区域
col3-2,the_content而我无法解决这个问题.
访问此处的网站 您可以看到图像和绿色元素之间的白色间隙.
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>
Run Code Online (Sandbox Code Playgroud)
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%;
}
Run Code Online (Sandbox Code Playgroud)
问题在于<p>标签中出现了一个无关的div.the_content标签:
<div class="col3-2">
<div id="content" class="clearfix">
<div class="the_content">
<p></p>
...
Run Code Online (Sandbox Code Playgroud)
看起来你是从其他地方把它拉出来的,所以编辑你发布的代码可能没什么用.只需<p></p>从内容源中删除即可.