![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
For the new Web site
www.beginneranimalcommunicaiton.com we have created a custome page template. The page aligns perfectly in Firefox and Chrome. However, when using IE, the border to the left completely disappears when pulling up this page. For example, if you click on "Practice Animals" and then "Animal #1" underneath, in Firefox and Chrome the entire body of the page stays aligned in the center. However, if you use IE, the entire page jumps to the left. Has anyone seen this issue before? Thanks, Joe P.S. I posted the code from the page below in case that would be helpful Code:
?php
/*
Template Name: Animal Page
*/
?>
<!-- Animal.php
developed by Joe P.
for BeginnerAnimalCommunication.com
-->
<?php get_header(); ?>
<div id="content">
<div id="contentleft">
<div class="postarea">
<?php include(TEMPLATEPATH."/breadcrumb.php");?>
<!-- Let's identify where we are for debugging
<?php echo "Page: animal.php" ?>
-->
<!-- The following If Statement and While Loop retrieve the content
from the Page.
-->
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1><br />
<?php the_content(); ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.', 'studiopress'); ?></p><?php endif; ?>
<!-- Ok, now let's get the posts for our category -->
<?php
$page_id = $post->ID; // Get page ID
$current_page_data = get_page($page_id); // Get page data
$title = $current_page_data->post_title; // Get title
$slug = $current_page_data->post_name; // Get slug, our category
$category_id = get_cat_id($slug); // Get category ID
$posts_per_page = -1; // Show all posts
$meta_field_name = "sortorder"; // This is the name of the custom field assigned to each post
$args = array('cat' => $category_id
,'posts_per_page' => $posts_per_page
,'orderby' => $meta_field_name
,'order' => ASC
,'meta_key' => $meta_field_name
);
$local_query = new WP_Query($args); // Execute query to get posts for our category
if( $local_query->have_posts() ) // Loop through the posts
{
while ( $local_query->have_posts())
{
$local_query->the_post();
$post_id = $post->ID; // Get the post ID
$post_name = $post->post_name; // Get the post name
?>
<strong><a href="<?php the_permalink();?>" rel="bookmark"><?php the_title();?></a></strong>
<?php
echo "<br>";
echo "<br>";
}
}
else
{
echo "Sorry, no posts found for this page!<br>";
}
?>
</div>
</div>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>
|
| Thread Tools | |
| Display Modes | |
|
|
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us