Grow your CSS skills. Land your dream job.

Comments Template Not Being Recognized as Part of DIV? (WP)

  • # September 20, 2011 at 12:51 am

    I’ve been hammering this question out over at stackoverflow with some folks: http://stackoverflow.com/questions/7478500/jquery-or-css-problem

    Take a look here to see the problem: http://themeforward.com/demo2/2011/01/17/testing-comments/comment-page-1/#comments

    I am using a javascript to make the height of #post_content and #sidebar match. I have figured out the problem is it works perfectly, but once the comments template is added to my single-post.php it all falls apart and the heights no longer match (as shown in the link). What do I have to do to make this code realize comments.php is wrapped by post_content!?

    Here is my javascript:

    CSS that may/may not play a role:

    #container {
    width: 1126px;
    clear: both;
    overflow: hidden;
    }
    #post_content {
    clear: both;
    display: block;
    float: left;
    overflow: hidden;
    width: 660px;
    background-color: #FF0000;
    }
    #sidebar {
    display: inline-block;
    float: right;
    width: 410px;
    overflow: hidden;
    background-color: #0000FF;
    }
    #respond {
    clear:both
    }
    #commentlist {
    list-style:none;
    width:100%
    }

    My markup:

    < ?php get_header(); ?>








    < ?php if (have_posts()) : ?>< ?php while (have_posts()) : the_post(); ?>


    < ?php if (function_exists('dimox_breadcrumbs')) dimox_breadcrumbs(); ?>



    ">
    < ?php echo get_avatar( get_the_author_email(), '50' ); ?>





    < ?php the_title(); ?>




    By < ?php the_author_posts_link( ); ?> | < ?php the_time('F j, Y'); ?> | < ?php comments_number( 'No comments', 'One comment', '% comments' ); ?>




    < ?php the_content(); ?>





    < ?php the_tags('Tags ',' / ','
    '); ?>




    < ?php $turl = getTinyUrl(get_permalink($post->ID));
    echo 'Short URL '.$turl.'' ?>










    < ?php comments_template(); ?>




    < ?php endwhile; else: ?>

    No matching entries found.


    < ?php endif; ?>

    < ?php get_sidebar(); ?>



    < ?php get_footer(); ?>
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".