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
Konstantin Petrovic
1,941 Points#logo problem, link stretching to full width of header, not limited by h1 and h2 width...
As i said, my h1 and h2 inside of header are wrapped by anchor, same as in this video.. but i found that link is stretching to full width of header its not limited by size of text inside of h1 and h2.. I will post you pic to understand better.. I have found same thing exist in this video tutorial when Nick place mouse on far left of header in video Style the Portfolio..
you can see it on 1:40
and here is my problem
2 Answers
Marcus Parsons
15,719 PointsI didn't originally put the anchor links inside of the h1 and h2 elements because I wasn't sure if it would validate if I did that. It turns out that it is valid to put anchor links inside of h1 and h2 elements, so that's what I did. By putting the anchor links inside of the elements, instead of wrapping around the elements, the anchor link only has a clickable area of the text content itself; this is for the same reason as I stated in my last answer because the anchor link now doesn't have to flow with the block content, it now just has to flow with the text content itself.
Here's the snapshot with everything back to h1 and h2 (only changed in index.html): https://w.trhou.se/m77a483aft
Nurul Ahsan
2,039 PointsMr. Konstantin Petrovic <header> <a href="index.html" id="logo"> <h1>Nick Pettit</h1> <h2>Designer</h2> </a> </header> This is 'h1' element, Just type and enlarge the font
CSS
logo {
text-align: center; margin: 0; }
h1 { font-family: 'Changa One', sans-serif; margin: 15px 0; font-size: 1.75em; font-weight: normal; line-height: 0.8em; }