我正在使用
<?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/这是一个学校项目的自定义网站,但也是一个真正的客户。显然还没有完成。。任何帮助都会给我带来爱和幸福。
我无法解释为什么会发生这种事。这当然很奇特。但我可以告诉你问题出在哪里以及如何解决
出于某种原因,这使得一切都向后看:
.title {
margin-top: -350px;
}
去掉它,你也可以去掉page4和.span8中的页边空白顶部设置。然后只需从最后两个元素中选择一个,放在一个页边空白顶部,就可以到达您想要的位置