我在用
<?php get_search_form(); ?>在我头上。动态生成的代码从上到下列出了项目,但它们从下到上显示,并进入我的横幅。
我只能控制底部(第一个)结果在页面上的位置,所以如果搜索只返回几个结果,将其向下移动以创建空间将是无用的。
我尝试设置高度并使用overflow: scroll;,但出于某种原因,页面无法处理它,它只显示了两个结果,而不管容器高度如何。
我不是PHP专家,但我通常可以跟随并作出修正。我从这个网站得到了这个PHP的结果页面。
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<p class="meta"><small>Posted on <?php the_time('F jS, Y') ?> by <?php the_author() ?> <?php edit_post_link('Edit', ' | ', ''); ?></small></p>
<div class="entry">
<?php the_excerpt(); ?>
</div>
</div>
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
</div>该网站目前在这里,http://testsite.saltrockdesign.com/,它是一个自定义的网站,一个学校的项目,但真正的客户也。显然还没完成..。任何帮助都会给我带来更多的爱和幸福。
发布于 2014-09-16 18:08:24
我无法解释为什么会发生这种事。这确实很奇怪。但我可以告诉你问题在哪里以及如何解决。
出于某种原因,这使一切看起来都是颠倒的:
.title {
margin-top: -350px;
}去掉它,还可以去掉.page4和.span8中的边距顶部设置。然后选择最后两个元素中的一个,放入一个单一的边距顶,这样你就可以到达你想要的地方了。
https://stackoverflow.com/questions/25859868
复制相似问题