WordPress.org

Ready to get started?Download WordPress

Forums

Proper Heading Tag Format (4 posts)

  1. xmatter
    Member
    Posted 2 years ago #

    Here is my code:

    h1 {margin:0px; padding:0px; line-height:24px; font-size:20px; font-weight:normal; }
    
    h2 {margin:0px; padding:0px; line-height:22px; font-size:18px; font-weight:normal; }
    
    h3 {margin:0px; padding:0px; line-height:20px; font-size:16px; font-weight:normal; }
    
    h4 {margin:0px; padding:0px; line-height:20px; font-size:16px; font-weight:normal; border-bottom:1px dashed #000; }
    
    h5 {margin:0px; padding:0px; line-height:16px; font-size:12px; font-weight:normal; }
    
    h6 {margin:0px; padding:0px; line-height:14px; font-size:10px; font-weight:normal; }
    
    .widget-footer h4 {margin:0 0 0 -11px; padding:0px; line-height:24px; background:#222; font-size:14px; font-weight:normal; text-align:center; color:#fff; text-shadow:1px 2px 3px #000; -moz-border-radius: 8px; -webkit-border-radius:8px; border-radius:8px 8px 0 0;}

    You will notice the h4 has a bottom border, but the widget-footer h4 does not. When viewing my site, the widget-footer h4 displays the bottom border. I know I can add border none, but i wanted to see if there was a better way to do/organize this code?

    Thanks

    code within footer region:

    <div class="widget-footer">
    		<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer 1') ) : ?>
    		<h4>Links</h4>
    		<ul>
    		 <li><a href="#">Sample</a></li>
    		 <li><a href="#">Sample</a></li>
    	       	<li><a href="#">Sample</a></li>
    		</ul>
    		</div>
    	<?php endif; ?>
    	</div>
  2. alchymyth
    Forum Moderator
    Posted 2 years ago #

    I know I can add border none, but i wanted to see if there was a better way to do/organize this code?

    there is no better way.

    http://www.w3schools.com/css/

  3. xmatter
    Member
    Posted 2 years ago #

    Thanks alc!!! i just realized i will remove the border from the standard h4 tag and place the border within the sidebar h4 tag. that will do it!

  4. Capefox
    Member
    Posted 2 years ago #

    In WordPress posts: Is the post TITLE automatically made H1 by default? If so, would my first in-post heading be an H2, or should I make it another H1?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags