A place to talk about the Rin and Manji themes
You are not logged in.
I'm trying to make a template file like the default page template but without the sidebar. I've almost got it except for this blasted gap that I can't figure out how to fix. You can see it here: http://www.bebi.r0x0rs.com/blog/customize/
This is the code I'm using:
<?php
/*
Template Name: Custom
*/
?>
<?php include "header.php"; ?>
<div id="container">
<div id="topcontent"></div>
<div id="singlecontent">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="page">
<br />
<div class="title" align="center" id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>" rel="bookmark">
<?php the_title('-image-'); ?>
</a>
</div>
<?php the_content(); ?>
</div>
<?php endwhile; endif; ?>
</div>
<div id="bottomcontent"></div>
</div>
<?php include('footer.php'); ?>
It's probably something stupid that I've goofed up on somewhere but for the life of me I'm blind to it. Would appreciate any help fixing this annoyance.
Last edited by Steph (08-09-2005 02:07:47)
Offline
Seems like the problem is in the
<div class="page">
There is probably something in the CSS code you should look at...
if you try to rename the class (let's say from "page" to "pagebak") it seems to work... well... at least the gap is gone.
Offline
Why not copy the default Post template? Structure-wise, it's like the Page template, but without the sidebar.
Offline
Yeah I tried that, but once I removed the comment template the gap appeared.
Offline
Bump...any ideas on how to get rid of that gap?
Offline
This may be a long shot, but have you tried putting something into the page and then loading it up. Maybe the gap will disappear when you have some content to fill the void. I just took comments and the date out of my page template and it's displaying fine. My code is similar to what you have:
<?php include "header.php"; ?>
<div id="container">
<div id="topcontent"></div>
<div id="singlecontent">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="postnavigation">
<div class="right">
<?php next_post(' % »','','yes') ?>
</div>
<div class="left">
<?php previous_post('« %','','yes') ?>
</div>
</div>
<div class="singlepost">
<div class="title" id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>" rel="bookmark">
<?php the_title(); ?>
</a>
</div>
<p><br>
<div class="storycontent">
<?php the_content(__('(more...)')); ?>
</div> <br/><?php wp_link_pages(); ?>
</div>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<div id="bottomcontent"></div>
</div>
</div>
<?php include('footer.php'); ?>
Some of those divs may be superfluous, but I'm not going to take anything else out just now as it looks fine (except on IE, which seems to have minor issues with displaying the background shades)
Offline
Still isn't working.
I needed it to span the whole width which is why I wasn't using the storycontent div. I think I might have to cut my losses on this one.
Offline
Steph, a quick and dirty way would be to modify bottomcontent, to actually have a negative margin for the top value. -30px should do the trick.
so effectively:
margin: -30px auto 10px auto;
Offline
Thanks khaled, it caused a problem with the post template page but that was easy to fix, just created a new bottomcontentcustom id and used the adjusted margin for that and the regular one for the post template.
But yeah there is a slight problem in IE (also the same problem that happened with the post template in firefox): screenshot here.
Offline