Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress From Bootstrap to WordPress Create Bootstrap Styled Theme Templates Creating a Basic Blog Listing Template

Isaac Russell
Isaac Russell
12,091 Points

Why is the margin-top have more space and I am missing a hr tag?

In the video it appears that the h1 headers such as "Blog", "Page with SIdebar" and "Full Width Page" all have more top margin and a hr after them. They appear to look more on the same level as the sidebar. I don't understand why mine don't as well. Mine are higher on the page and missing the hr.

I have downloaded the source code and searched all locations for margin and hr and everything seems identical.

Is it because I'm using a newer version of bootstrap or wordpress? I don't understand.

How can I fix this?

Luke Travis
Luke Travis
2,887 Points

any way to see the difference in code between yours and the video examples?

5 Answers

Luke Travis
Luke Travis
2,887 Points

hmmm. well as far as I can tell from that code. there are two divs with the class of page-header that are missing an equals sign...

I would try adding an equals sign between the word class and the parenthesis before "page-header" and that might clear things up!

Here's to hoping it's a simple solution like that!

Isaac Russell
Isaac Russell
12,091 Points

Luke, sure which template or piece of code would you like to see?

Luke Travis
Luke Travis
2,887 Points

if i see your full width example and the videos, then I can compare between. Have you checked how it looks in different browsers yet?

Isaac Russell
Isaac Russell
12,091 Points

Luke,

Thanks for your help! Yes I have checked with Chrome, Firefox and Safari. All three show the same problem. Here is the code:

<?php /* Template Name: Full Width Template */

?> <?php get_header(); ?>

  <div class="container">
    <div class="row">

      <div class="col-md-12">

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

          <div class"page-header">
            <h1><?php the_title(); ?></h1>
          </div>

          <?php the_content(); ?> 

        <?php endwhile; else: ?>

        <div class"page-header">
            <h1>Oh no!</h1>
          </div>

          <p>No content is appearing for this page</p>

         <?php endif; ?>

      </div>

    </div>

<?php get_footer(); ?>

Isaac Russell
Isaac Russell
12,091 Points

Luke. You were right. I was missing an equals sign! Thanks so much for your help!!!