div tag being ignored
I’m modifying the template design for my blog site and running into a layout problem that I can’t fix. It seems to be related to how the div tags are coded into the PHP page. What I want to do is this … float the page content within a 900px frame that centers on the screen. The main content and sidebar are floated side-by-side within that frame. I can get the layout to work perfectly in standard html, but when I put the tags in the page.php file, the 900px frame tag is ignored. The URL is http://www.whiteboxerdesign.com (the properly-functioning html page is http://www.whiteboxerdesign.com/testpage.htm). Below is the code that I have in page.php that’s not working properly.
<?php get_header(); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class=”post” id=”post-<?php the_ID(); ?>”>
<h2><?php the_title(); ?></h2>
<?php the_content(‘<p class=”serif”>Read the rest of this page »</p>’); ?>
<?php link_pages(‘<p>Pages: ‘, ‘</p>’, ‘number’); ?>
<?php endwhile; endif; ?>
<?php edit_post_link(‘Edit this entry.’, ‘<p>’, ‘</p>’); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
The effect is working properly for the header and footer tags, but I’m not quite sure (assuming it is an issue with the DIV tag interfering with the PHP code) what exactly the conflict is and how to resolve it … I’m really raw with PHP. Thanks.
- The topic ‘div tag being ignored’ is closed to new replies.