我想在 this 上制作图像页面居中对齐。我尝试了以下解决方案,但在我的情况下不起作用。请指导。 密码:inspurate123
解决方案:
display: block;
margin-left: auto;
margin-right: auto;
我的代码:
<div class="title_area" style="float:left;">
<h1 class="post_title">
<a href="<?php the_permalink();?>" title="<?php the_title_attribute(); ?>">
<?php the_title(); ?>
</a>
</h1>
<br>
<?php the_content(); ?>
</div>
</article>
<?php get_template_part('share_this');?>
</div>
最佳答案
试一试:-
.wp-caption.alignnone{
margin:0 auto
}
.title_area img {
display: block;
margin: 0 auto;
width: 90%;
}
希望它对你有用。
关于html - 使图像居中对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26424007/