CSS help please

madmusician

Club Cricketer
Joined
Sep 30, 2005
Location
Ipswich, UK
Online Cricket Games Owned
Not sure whether to put this in Computers & Tech, but plumped for here instead.

Basically, I have pretty much finished the new look for my website, which runs off WordPress, and am just tinkering with some of the template. The template for Category view was IMO rather ugly, so I tried to sort it out by deleting both sidebars, but I now have another issue.

Here is the page, the php code for the template is below. How can I indent the text the same amount as the main blue template?

Thanks for your help...

Code:
<?php include('header.php'); ?>
  <div id="topcontentdouble"></div>
   <div id="content">
     <div class="contentright">
   <div class="post">
    <?php if (have_posts()) : ?>
     <h2 class="searchresult">Category</h2>
     <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
     <div class="searchdetails">
      Archive for the '<?php echo single_cat_title(); ?>' Category
     </div>
      <?php while (have_posts()) : the_post(); ?>
	   <h2 class="searchresult">
        <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
   	     <?php the_title(); ?>
        </a>
       </h2>
	   <div class="searchinfo">
        <?php _e("("); ?> <?php the_category(' and') ?> <?php _e(")"); ?>
       </div>
       <div class="clearer"> </div>
       <?php the_excerpt() ?>
       <div class="searchinfo">
        <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
         (to view associated entry please click here)</a>
       </div>
      <?php endwhile; ?>
     <?php else : ?>
      Not Found
    <?php endif; ?>
   </div> <!-- This closes the singlepost div-->
   
   <div class="postnavigation">
    <div class="right">
     <?php posts_nav_link('','','previous posts + ?') ?>
    </div>
    <div class="left">
     <?php posts_nav_link('','? + newer posts ','') ?>
        </div>
       </div>
      </div> <!--Closes the contentright div-->
     </div> <!-- Closes the content div-->
    <div id="bottomcontentdouble">
    </div>
 </div> <!-- Closes the container div-->
<?php include('footer.php'); ?>
 
Last edited:
<div class="contentright" style="{margin-left:150px;}"> where 150px is the width of the left sidebar. :cheers

BTW, change the title to CSS help ;)
 
Thanks very much for that - I don't know too much about coding php and css as you can probably tell!
 
You probably want to put the CSS in the CSS file instead of cluttering up the PHP with formatting code.

Look for .contentright or div.contentright in the CSS file and if you cannot find it, create a declaration for that class.
 

Users who are viewing this thread

Top