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

HTML

Tom Lucey
Tom Lucey
7,546 Points

Inconsistencies when creating new page - issues in header section

Hi there, so I think my issue applies to header of my pages. Two things I would like to resolve:

•`The size of all elements in header area (H1, H2 and nav) goes larger on about and contact pages.

•`An unwanted white bar appears above header on contact page. I will provide code below, any help would be greatly appreciated.

Steven Parker
Steven Parker
231,060 Points

The page code seems to be missing, and the CSS has been altered because it wasn't quoted.

You can share everything at once if you make a snapshot of your workspace and provide the link to it.

Tom Lucey
Tom Lucey
7,546 Points

Thanks @stevenparker

I've got a snapshot below https://w.trhou.se/un001gsodj

2 Answers

Alex Watts
Alex Watts
8,396 Points

Hi Tom,

I have sorted your code out. Your issue concerning the white space above your header was caused by an extra margin from your heading. By default they have a pre-set margin, this can be altered by removing it (see below).

h1, h2, h3, h4, h5, h6 {
 margin: 0;
}

The other issue occurs because you have a different amount of content on each page. This unfortunately cannot be resolved unless you have more content on your page to make the scroll bar appear, which is causing the problem.

The fixed result - https://w.trhou.se/cu7wkktycb

Hope this helps! Nice portfolio :)

Tom Lucey
Tom Lucey
7,546 Points

Thanks Alex, that has resolved the additional white space issue. The header size inconsistency remains a frustration but maybe I will try and add blank content to make scroll bar appear.

Thanks mate

Christopher Johnson
Christopher Johnson
2,069 Points

Without your HTML it's hard to answer, but it could be something to do with the margin in this:

h1 { font-family: 'Roboto', sans-serif; margin: 15px 0; font-size: 2em; font-weight: bold; line-height: 0.8em; }

Tom Lucey
Tom Lucey
7,546 Points

Thanks for your help Chris