我正在运行一个查询,它在行流中输出一个span4元素。我在css中添加了代码,以删除行流中第三个span4的左边框。到目前为止,这也起作用了,但突然之间,span4中的一个跳了起来。有什么建议吗,为什么这突然停止工作?
您可以在这里看到页面:http://dtm-auto.ch/home/
我的css:
.row-fluid [class*="span"]:nth-child(3n+1) {
margin-left: 0!important;
}我的代码:
<div id="content" class="clearfix row-fluid">
<div id="main" class="span12 clearfix" role="main">
<h2 class="text-left">Neue Fahrzeuge</h2>
<div class="clearfix row-fluid">
<?php
global $wp_query;
query_posts( array(
'post_type' => 'acme_product',
'posts_per_page' => 6
));
while ( $wp_query->have_posts() ) :
$wp_query->the_post();
?><?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );?>
<div id="front-new-video" class="span4">
<a href="<?php echo get_permalink(); ?>"><h3 id="car-title"><?php the_title(); ?></h3> </a>
<div class="thumbnail wrapper">
<div class="ribbon-wrapper-green"><div class="ribbon-green">Neu</div></div>
<a href="<?php echo get_permalink(); ?>"><?php the_post_thumbnail('medium');?></a>
<p>Preis: <span style="color:#FEF158"><?php the_field('preis'); ?> CHF</span></p>
<p>Jahr: <span style="color:#FEF158"><?php the_field('jahr'); ?></span></p>
<p>Farbe: <span style="color:#FEF158"><?php the_field('farbe'); ?></span></p>
<p>KM: <span style="color:#FEF158"><?php the_field('km'); ?> KM</span></p>
<a href="<?php echo get_permalink(); ?>"><h4> <i class="icon-chevron-sign-right"></i> Zum Fahrzeug </h4></a>
</div>
</div>
<?php
endwhile;
?>
</div>
</div> <!-- end #main -->
</div> <!-- end #content -->发布于 2013-12-05 13:58:07
这是因为您在#front-new-video上使用的是#front-new-video,它实际上什么也不做,因为父母的身高(行流体)需要与height: 100%的工作方式相反。用固定高度或最小高度代替,你的问题就会解决.例如height: 419px;
https://stackoverflow.com/questions/20401451
复制相似问题