• Resolved clarawr

    (@clarawr)


    Website is located here: https://www.sugarhooker.com/wp

    I’m trying to get the postmetadata tags to line up horizontally, under the borderline, but whenever I add a link, it breaks.

    I want it to say: ‘Posted by Author | Comments (0)’ in a straight line, why does it break?

    I’m also wondering why won’t the date show? But I’m not too worried about that.

    Here’s the Index.php code:

    <?php get_header(); ?>
    <div id="leftColumn">
    <?php if (have_posts()) : ?>
    
    	<?php while (have_posts()) : the_post(); ?>
    
    	<div class="post" id="post-<?php the_ID(); ?>">
    
    	<div class="date">
    
    		<span class="dateMonth"><?php the_time('M'); ?></span>
    		<span class="dateDay"><?php the_time('d'); ?></span>
    		<span class="dateYear"><?php the_time('Y'); ?></span>
    	</div>	
    
    		<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <div class="entry">
    				<?php the_content('Read more &raquo;'); ?>
    		</div>
    
    		<div class="postmetadata">
    		 <small><p>
    		  Posted by<?php the_author_posts_link(); ?> | <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    			</p>
    			</small>
    			</div> 
    
    		<?php comments_template(); ?>
    
    		</div>
    
    	<?php endwhile; ?>
    
    	<div id="navigation">
    			<div class="fleft"><?php next_posts_link('&laquo; Older') ?></div>
    					<div class="fright"> <?php previous_posts_link('Newer &raquo;') ?></div>
    	</div>
    
    	<?php else : ?>
    
    	<div class="post">
    	<div class="entry">
    		<h2>Not Found</h2>
    		<p>Sorry, you are looking for something that isn't here.</p>
    	</div>
    	</div>	
    
    	<?php endif; ?>
    
    	</div>
    
    <?php get_sidebar(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • the underlying reason is that the div #nav is not closed after the nav in the header, and is open to unwantedly influence a lot of styles in the main area; for instance this:

    #nav li, #nav a {
    	height: 30px;
    	display:block;
    }

    this turns the links in postmetadata into block elements and causes the display error.

    similat issue with your date spans:

    #nav span {
    	display: none;
    }

    this style, which maybe makes sense in the nav, is making your date invisible.

    fix the issue with the open #nav div, and fix the other validation errors https://validator.w3.org/check?uri=http%3A%2F%2Fsugarhooker.com%2Fwp%2F&charset=%28detect+automatically%29&doctype=Inline&group=0 and you should have no need to edit style.css for the questions you asked in this thread.

    Thread Starter clarawr

    (@clarawr)

    Thank you so much! Just the info I needed!
    I was able to close the nav and that solved my problem. Now I just need to fix all the other errors…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Postmetadata tags will not line up properly!’ is closed to new replies.