Broken Kode Discussion Forums

A place to talk about the Rin and Manji themes

You are not logged in.

#1 08-09-2005 01:33:22

Steph
Member
From: Southern California
Registered: 17-07-2005
Posts: 38
Website

Stuck with template

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. wink

Last edited by Steph (08-09-2005 02:07:47)

Offline

 

#2 09-09-2005 07:44:30

flipthedolphin
New member
Registered: 09-09-2005
Posts: 7

Re: Stuck with template

Seems like the problem is in the

Code:

 <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

 

#3 09-09-2005 18:24:34

MacManX
Moderator
Registered: 28-03-2005
Posts: 80
Website

Re: Stuck with template

Why not copy the default Post template?  Structure-wise, it's like the Page template, but without the sidebar.


Disclaimer: I am a forum volunteer.  I only represent Rin as a user and reserve the right to refuse service to anyone at anytime.  The opinions stated in my postings are not necessarily those of Khaled Abou Alfa or his affiliates.

MacManX.com

Offline

 

#4 10-09-2005 13:54:30

Steph
Member
From: Southern California
Registered: 17-07-2005
Posts: 38
Website

Re: Stuck with template

Yeah I tried that, but once I removed the comment template the gap appeared. hmm

Offline

 

#5 18-09-2005 02:12:55

Steph
Member
From: Southern California
Registered: 17-07-2005
Posts: 38
Website

Re: Stuck with template

Bump...any ideas on how to get rid of that gap?

Offline

 

#6 07-10-2005 08:02:20

beev
Member
From: Scotland
Registered: 29-08-2005
Posts: 12
Website

Re: Stuck with template

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

 

#7 07-10-2005 13:55:23

Steph
Member
From: Southern California
Registered: 17-07-2005
Posts: 38
Website

Re: Stuck with template

Still isn't working. hmm

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

 

#8 07-10-2005 23:20:25

khaled
Administrator
From: London, UK
Registered: 25-03-2005
Posts: 80
Website

Re: Stuck with template

I'll have a look at it Steph.

Offline

 

#9 10-10-2005 13:02:12

khaled
Administrator
From: London, UK
Registered: 25-03-2005
Posts: 80
Website

Re: Stuck with template

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

 

#10 10-10-2005 13:37:19

Steph
Member
From: Southern California
Registered: 17-07-2005
Posts: 38
Website

Re: Stuck with template

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. wink

But yeah there is a slight problem in IE (also the same problem that happened with the post template in firefox): screenshot here.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson