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
sean jones
5,682 PointsAligning 3 text inputs to center of the page
I have three text input fields in the same <ul> and I cant figure out how to get them centered. I have tried everything, putting it inside a div, every kind of margin change I can think of and still no. Can anyone fix the problem and tell me where I'm going wrong.
my html is
<ul>
<li><input id="day" type="text"></li>
<li><input id="month" type="text"></li>
<li><input id="year" type="text"></li>
</ul>
ul {
max-width: 100%;
display:block;
margin: 0 auto;
padding: 0;
}
1 Answer
Konrad Pilch
2,435 Pointsmax-width: 100%; -- maybe try to change this to i dont know 70%?
Try to experminet with your code. I wont say anything more :) Just expermient it and tell me how it went please.