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 trialJosie Nagy
14,992 PointsIs my text properly aligned with the baseline grid? (Web Typography Course)
Web Typography -> Final Project: Create a Typographic Site -> Getting Started: HTML and CSS
Hi everyone! I used the Basehold.it code to add the baseline grid, but I don't think my text is aligned that well right now.
I followed the instructions in the video, but I I'm not sure about the results, what do you guys think?
My code: https://w.trhou.se/1lbbd4wcvj
2 Answers
Benjamin Larson
34,055 PointsHi Josie -
Your text isn't quite aligned because your font-size in the body is set to 1.24em, whereas in the video it is set to 1.25em. That 0.01 difference has such a significant effect largely because all the relative sizes are going to be based on the font-size defined in the body.
Also, that will only align the paragraphs in the grid for now, and not the headings. There's no native support in CSS for concepts like vertical rhythm (yet, anyway) and as such, it's a bit finicky and annoying. Take note of the videos and recommended practices, as they are helpful but I wouldn't get married to the idea of needing every element on a page to line up to a grid. Taking some time to design consistent margin and spacing, primarily between headings and paragraphs (often at multiples of the line-height) that utilize principles for good readability and scalability will go a long way without going crazy trying to align everything on the page.
pat barosy
6,759 PointsWhat happens if I set the body font-size to 1.25 rem instead of em? How does that affect page layout?
Josie Nagy
14,992 PointsJosie Nagy
14,992 PointsThank you for taking the time to reply and look at my code, that was helpful. :)