PHP的基本问题-换行

阿瑞特

我在wordpress网站上工作,对PHP不太熟悉。我设法以某种方式在图像下方产生了以下空白行:

http://i.imgur.com/PazQgLl.jpg

所以我的问题是如何删除或避免在图像下方留出空白空间。

这是该页面的PHP。我认为原因必须在这里的某个地方。

<?php
/**
 * The template part for displaying the post meta information
 *
 * @package Editor
 */
?>
<div class="entry-meta">
<!-- Grab and display the featured image -->
<?php if ( '' != get_the_post_thumbnail()) {?>
<a class="frontfeatured-image" href="<?php the_permalink()?>">
<?php the_post_thumbnail('thumbnail-image')?>
</a>
<?php }?>

<!--
    <ul class="meta-list">
        <?php if ( has_category() ) { ?>
            <li class="meta-cat"><?php the_category( ', ' ); ?></li>
        <?php } ?>
        <?php $posttags = get_the_tags(); if ( $posttags ) { ?>
            <li class="meta-tag"><?php the_tags( '' ); ?></li>
        <?php } ?>
        <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
        <li class="meta-comment">
            <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'editor' ), __( '1 Comment', 'editor' ), __( '% Comments', 'editor' ) ); ?></span>
        </li>
        <?php endif; ?>
    </ul>
-->
</div>

CSS:

.entry-meta {
  display: inline-block;
  width: 40%;
  margin-right: 10px;
  vertical-align: top;
  border-width: 10px;
  border-color: #000000;
  border-style: solid;
}
@media (max-width: 768px) {
  .entry-meta {
    margin-bottom: 0%;
    width: 100%;
  }
}

.frontfeatured-image {
  display: inherit;
  border-style: solid;
  border-color: #000000;
  border-width: 0px;  
  padding: 0px 0px 0px 0px;
  margin: 0px 0px 0px 0px;
  width: 100%;
    -webkit-filter: grayscale(1);
    filter: grayscale(1);
    -moz-transition:-moz-transform 0.5s ease-in; 
    -webkit-transition:-webkit-transform 0.5s ease-in; 
    -o-transition:-o-transform 0.5s ease-in;
    -moz-transition:-moz-transform 0.5s ease-out; 
    -webkit-transition:-webkit-transform 0.5s ease-out; 
    -o-transition:-o-transform 0.5s ease-out;
    }
    .frontfeatured-image:hover{
    -moz-transform:scale(1.02); 
    -webkit-transform:scale(1.02);
    -o-transform:scale(1.02);
    color: #000000;
  }
昌德鲁

试试这个

.frontfeatured-image img{
  float: left;
}

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章