【发布时间】:2017-04-19 01:42:10
【问题描述】:
早安,
我正在为企业家构建一个免费的 wordpress 主题,但遇到了这个挑战:
我想去除帖子容器之间的空白,如上图所示。
在中间的帖子中,帖子日期没有显示,我不知道为什么。
这是我的代码:
HTML/PHP
<div class="container-fluid">
<div class="navbar">
<div>
<a class="navbar-brand" href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>" >
<?php bloginfo('name'); ?></a>
</div>
<div>
<!--<h1 class="blog-title"><?php bloginfo( 'name' ); ?></h1>-->
<?php $description = get_bloginfo( 'description', 'display' ); ?>
<?php if($description) { ?><p class="blog-description"><?php echo $description ?></p><?php } ?></p>
<?php wp_nav_menu (array(
'theme_location' => 'header-menu',
'menu_class' => 'nav navbar-nav pull-right'
) ); ?>
</div>
CSS:
.layerit {
width: 100%;
height: 100%;
padding-top: 170px;
margin: 0 auto;
background: rgba(0, 0, 0, .3);
position: relative;
bottom: 0;
right: 0;
text-align: center;
transition: background-color .9s ease;
}
.home-title {
color: white;
}
.home-author {
color: white;
padding-top: 20px;
padding-bottom: 90px;
}
div.no-margin {
}
感谢您的帮助。
【问题讨论】:
-
padding: 0; margin: 0;会成功的。 -
2.你试过
<span class="entry-date"><?php echo get_the_date(); ?></span> -
用填充修复了所有这些:0;边距:0;感谢 Dipu Raj 和大家,但最近遇到的问题是,每当帖子标题很长时,框就会溢出,我该如何解决这个问题?
标签: php css twitter-bootstrap wordpress-theming