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 trialTom Lucey
7,546 PointsInconsistencies 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.
Tom Lucey
7,546 PointsThanks @stevenparker
I've got a snapshot below https://w.trhou.se/un001gsodj
2 Answers
Alex Watts
8,396 PointsHi 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
7,546 PointsThanks 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
2,069 PointsWithout 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
7,546 PointsThanks for your help Chris
Steven Parker
231,060 PointsSteven Parker
231,060 PointsThe 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.