Alignment issues
-
In IE only, I’m having alignment issues with my footer and my content…it’s off by one pixel depending on the size of the window.
https://zamagazine.org/index.php
I did some trouleshooting and these are some observations that may help:
– It’s a problem on every page.
– I rolled back the footer content as close to the original Kubrick as I could (in fact, I think it’s exact other than changing the image and width to suit my design). Also, some quick and dirty analysis in Photoshop with a screenshot leads me to believe that the footer is centered correctly while the body and sidebar are not.
– It worked fine before I cleaned up my code to XHTML standards. Most changes I made with that came from the sidebar, so that could have something to do with the problem.
– Resizing the window causes the alignment to shift around.Code resources follow. It’s only a minor problem but I won’t launch this site until I get it right! Thanks for any help ??
Brendan
CSS code is here: https://zamagazine.org/wp-content/themes/ZATheme/style.css
footer.php code is currently identical to Kubrick.
main index code is here:
<?php get_header(); ?> <div id="centerthecontent"> <div id="content" class="narrowcolumn"> <br /><br /> <?php $temp_query = $wp_query; ?> <?php if (is_home()) { query_posts("cat=-3"); } ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <span class="articleTitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a> //</span> <span class="dateauthor"><span class="justdate"><?php the_time('n.j.y') ?> //</span> <?php the_author() ?></span> <div class="entry"> <?php the_excerpt('Read the rest of this entry »'); ?><!--<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">>> Read it</a>--> </div> <span class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> <b>category: <?php the_category(', ') ?></b> | <!--<?php edit_post_link('Edit', '', ' | '); ?> --> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></span> </div><br /><br /> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php $wp_query = $temp_query; ?> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?> </div> <?php get_sidebar(); ?> </div> <?php get_footer(); ?>
sidebar.php code is here:
<div id="sidebar"> <ul> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <?php if (is_single()) { $img = get_post_meta($post->ID, 'image', $single = true); $img_class = get_post_meta($post->ID, 'image class', $single = true); ?> <?php if (is_single()) { ?> <?php // if there's an image if($img !== '') { ?> <li> <ul style="padding: 10px; margin: 0 0 15px 5px; width: 175px; border-bottom: 3px solid #958E60; border-top: 3px solid #958E60; background: #fffdf9;"> <li> <p> <img src="<?php echo $img; ?>" class="<?php if($img_class !== '') { echo $img_class; } else { echo "left"; } ?>" alt="<?php the_title_attribute(); ?>" /> </p> </li> <?php } // end if statement // if there's not an image else { echo ''; } ?> <?php } ?> <?php if (is_single()) { $tag = get_post_meta($post->ID, 'tagline', $single = true); ?> <li <?php if($img == '') { echo 'style="padding: 10px; margin: 0 0 15px 5px; width: 175px; border-bottom: 3px solid #958E60; border-top: 3px solid #958E60; background: #fffdf9;"'; } ?>> <p class="postmetadata side"> <?php if($tag !== '') { echo '<font size="+1">' . $tag . '</font><br /><br />'; } else { echo ''; } ?> by <?php the_author(); ?><br /> <?php the_time('F jS, Y') ?><br /> <?php the_category(', ') ?><br /> comment feed - <?php comments_rss_link('RSS 2.0'); ?> </p> </li> <?php } ?> <?php if($img !== '') { ?> </ul></li> <?php } // end if statement // if there's not an image else { echo ''; } ?> <?php } ?> <?php if (is_home()) { ?> <li> [kml_flashembed movie="https://zamagazine.org/images/welcomebutton.swf" height="205" width="205" /] </li> <?php } ?> <?php if (!is_home()) { ?> <?php $temp_query = $wp_query; ?> <?php query_posts('cat=-3&showposts=3'); ?> <li> <div class="latestmargin"> <div class="bl4"><div class="br4"><div class="tl4"><div class="tr4"> <img src="https://zamagazine.org/images/latest.png" alt="Latest Posts" /><br /> <ul> <?php while (have_posts()) : the_post(); ?> <li><a href='<?php the_permalink() ?>'><?php the_title(); ?></a></li> <?php endwhile; ?> </ul> </div></div></div></div> <div class="clear"> </div> </div> </li> <?php $wp_query = $temp_query; ?> <?php } ?> <li> <div class="catmargin"> <div class="bl"><div class="br"><div class="tl"><div class="tr"> <img src="https://zamagazine.org/images/categories.png" alt="Categories" /><br /> <div class="categories"> <?php wp_list_categories('style=0&before=<div>&after=</div>&link_before= &show_count=1&title_li=&exclude=3'); ?> </div> </div></div></div></div> <div class="clear"> </div> </div> </li> <?php $temp_query = $wp_query; ?> <?php query_posts('cat=3&showposts=3'); ?> <li> <div class="catmargin"> <div class="bl2"><div class="br2"><div class="tl2"><div class="tr2"> <img src="https://zamagazine.org/images/blog.png" alt="Latest Blog Posts" /><br /> <ul> <?php while (have_posts()) : the_post(); ?> <li><a href='<?php the_permalink() ?>'><?php the_title(); ?></a></li> <?php endwhile; ?> </ul> </div></div></div></div> <div class="clear"> </div> </div> </li> <?php $wp_query = $temp_query; ?> <?php if (is_home() || is_page()) { ?> <?php } ?> <li> [kml_flashembed movie="https://zamagazine.org/images/facebook2.swf" height="50" width="205" /] </li> <!-- <li> <h2>ARCHIVES</h2> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> </li> // --> <!-- <?php if ( is_404() || is_category() || is_day() || is_month() || is_year() || is_search() || is_paged() ) { ?> <li> <?php /* If this is a 404 page */ if (is_404()) { ?> <?php /* If this is a category archive */ } elseif (is_category()) { ?> <p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p> <?php /* If this is a yearly archive */ } elseif (is_day()) { ?> <p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives for the day <?php the_time('l, F jS, Y'); ?>.</p> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives for <?php the_time('F, Y'); ?>.</p> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives for the year <?php the_time('Y'); ?>.</p> <?php /* If this is a monthly archive */ } elseif (is_search()) { ?> <p>You have searched the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives for <strong>'<?php the_search_query(); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p> <?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <p>You are currently browsing the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives.</p> <?php } ?> </li> <?php }?> // --> <li> <div class="rssmargin"> <div class="bl3"><div class="br3"><div class="tl3"><div class="tr3"> <img src="https://zamagazine.org/images/rss.png" alt="RSS Feeds for Subscriptions" /> <img src="https://zamagazine.org/images/feed-icon-28x28.png" alt="RSS" /><br /> <ul> <li><a href="https://zamagazine.org/index.php?feed=rss2&cat=-3" title="Articles Feed">Articles Feed</a></li> <li><a href="https://zamagazine.org/category/blog/feed" title="Blog Feed">Blog Feed</a></li> <li><a href="feed:<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>">Articles/Blog Feed</a></li> <li><a href="https://zamagazine.org/comments/feed" title="Comments Feed">Comments Feed</a></li> </ul> </div></div></div></div> <div class="clear"> </div> </div></li> <?php endif; ?> </ul> </div>
- The topic ‘Alignment issues’ is closed to new replies.