gpt4 book ai didi

html - 我怎样才能摆脱那里的返回?

转载 作者:太空宇宙 更新时间:2023-11-03 22:59:01 25 4
gpt4 key购买 nike

我试图在我的 wordpress 循环中摆脱以下返回。我想在条目旁边显示一个缩略图,它看起来很糟糕:

the situation

我尝试对条目使用填充,但更糟!!

这是我的代码:

#thumbnail_single {
float: left;
}
.entry_single {
padding: 20px;
}
<div id="single">

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h2 class="title_single"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>

<div id="thumbnail_single">

<?php if ( has_post_thumbnail() ) : ?>
<?php the_post_thumbnail(); ?>
</a>
<?php endif; ?>

</div>
<div class="entry_single">
<?php the_content(); ?>
</div>
<?php endwhile; endif; ?>

</div>
<!-- single -->

感谢您的帮助!

最佳答案

我不完全清楚,但有 2 个选项取决于最终结果:

环绕文字:

#thumbnail_single {
float: left;
margin-right:20px;
}
.entry_single {

}

文本不换行:

涉及BFC:http://www.sitepoint.com/understanding-block-formatting-contexts-in-css/

#thumbnail_single {
float: left;
}
.entry_single {
padding: 20px;
overflow:hidden;
}

关于html - 我怎样才能摆脱那里的返回?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37243442/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com