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 trialfrederik christensen
5,740 PointsNeed some help with some text layout
So i am recreating a website for practice and i saw his text was looking so smooth. https://gyazo.com/158c3458a4ccf795b3537358fca5ddb0 What code should i use for it to look like that because at this point i am clueless.
4 Answers
Steven Parker
231,261 PointsYou can always load in special fonts to spice up your site appearance. A great resource with many free fonts available is Google Fonts.
You'll find techniques covered by several of the courses here, including Web Typography.
To get the same number of characters in each line, you can use any monospaced font.
But perhaps what you mean by "smooth" is to have a straight margin line on both sides. This can be done with a CSS setting, for example:
p {
text-align: justify;
}
frederik christensen
5,740 PointsOh that wasn't what i meant. I wanted each line to have the same amount of characters in it. So it would look more smooth
Steven Parker
231,261 PointsI expanded my answer a bit, see if that's more like it.
frederik christensen
5,740 PointsWhen i try that its not centered anymore
Steven Parker
231,261 PointsIt would help to see your actual code. If possible, make a snapshot of your workspace and post the link to it here.
frederik christensen
5,740 PointsThanks for the help. I fixed it :)
Steven Parker
231,261 PointsGlad to help! You can mark the question solved by choosing a "best answer".
And happy coding!