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 trialLauren Hunkeler
2,759 PointsHow do I center my text boxes on the page?
How do I align my text boxes to be centered on the page with the logo and submit button? Here is my code... https://w.trhou.se/5ns27j36bf Hopefully this works!
shadowheart411
2,660 PointsI see the same as Julian Gutierrez's comment
Cindy Lea
Courses Plus Student 6,497 PointsTry this...
textarea { text-align: center; }input { text-align: center; }
Lauren Hunkeler
2,759 PointsI changed the code link in the original question. I hope it works for you!
I tried entering the code, { text-align: center; }input { text-align: center; } but nothing changed. I tired putting it in a few places, but with no luck.
2 Answers
Nathan Ward
7,907 PointsIf you increase your .choice-bucket class from 44.44444%% width to 50% this should make the boxes centered.
So
.choice-bucket {
width: 44.44444%;
font-size: 18px;
text-align: center;
float: left;
display: inline-block;
margin: 0;
padding: 0;
}
Will become:
.choice-bucket {
width: 50%;
float: left;
display: inline-block;
margin: 0;
padding: 0;
}
Lauren Hunkeler
2,759 PointsThanks so much! I appreciate it :)
Julian Gutierrez
19,201 PointsJulian Gutierrez
19,201 PointsA direct link to your workspace does not work try creating a snapshot of your workspace by going to the upper right hand corner of your workspace and clicking on the first icon "Snapshot Workspace". Then you can copy that url and past it here.