Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

A don't understand why the sidebar of my Wordpress blog does not have consistent formatting for H3 tags.

There are two PHP-generated un-styled H3 tags in the sidebar, followed by my own manual H3 tag. The first two appear larger than the third, yet they are identical tags.

The site in question is here.

The contents of sidebar.php are:

<div class="sidebar">

<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar') ) :
    $widget_args = array(
        'after_widget' => '</div></div>',
        'before_title' => '<h3>',
        'after_title' => '</h3><div class="widget-body clear">'
    );
?>

<?php the_widget( 'GetConnected', 'title=Get Connected', $widget_args); ?>

<?php the_widget( 'Recentposts_thumbnail', 'title=Recent posts', $widget_args); ?>

<?php endif; ?>

</div>

<div class="sidebar">
<h3>Choice links</h3>
<p>&nbsp;</p>
<ul>
    <li><a href="http://www.annimac.com.au">Annimac Consultants</a> - Futurist & Life Coach</li>
    <li><a href="http://www.melvilletenniscentre.com.au">Melville Tennis Centre</a> - Great social tennis</li>
</ul> 
</div>      
share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

You have a wrong selector in your CSS stylesheet. It is .widget h3, but should be .sidebar h3 (look into your HTML code). Besides - <p>&nbsp;</p> is a big "no, no". One does not set the layout using empty and not semantically neutral block elements. Just use margins or paddings instead.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.