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 trialbarnabasadedoyin
1,501 PointsText not aligning well
Hi, on responsive course. I did my #primary and #secondary css and created section id for them but after refreshing my browsers it gives this-screenshot: http://awesomescreenshot.com/0903rej8f5
How can I make the text to be properly aligned?
barnabasadedoyin
1,501 PointsHi Michael, here is the code I followed:
primary {
width: 50px;
float: left;
}
#secondary { width: 40px; float: right; }
2 Answers
Jason Anello
Courses Plus Student 94,610 PointsHi barnabasadedoyin,
You used px
instead of %
. This made your columns really narrow.
barnabasadedoyin
1,501 PointsOuch! Thanks Jason. That's it.
Jason Anello
Courses Plus Student 94,610 PointsYou're welcome.
Jon Benson
12,168 PointsBarnabasadedoyin--
We need to see your code, check out the Markdown Cheatsheet below to see how to make it show up in here.
Mostly it's the three backticks surrounding code html
<a> What the heck?</a>
Then post up the code! All the Best, Jon
barnabasadedoyin
1,501 PointsOk Jon, here is the code:
primary {
width: 50px;
float: left;
}
#secondary { width: 40px; float: right; }
But the text didn't aligned well still...
Michael Caveney
50,144 PointsMichael Caveney
50,144 PointsDid you set the text-align to left? If so, what are your margins set to?