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 trialEmmanuel Rojas
6,994 PointsHi! what about if I want to use the inline-block for my buttons submit and reset, but I want to move them to the center.
Hi! what about if I want to use the inline-block for my buttons submit and reset, but I want to move them to the center. I do not get a way to do it. Thank you!
4 Answers
Gianmarco Mazzoran
22,076 PointsHi Emmanuel,
since I don't know how your code is I post here some html and the css for centering two or more buttons.
<div class="button-group">
<button>SUBMIT</button>
<button>RESET</button>
</div>
.button-group {
text-align: center; /* that's all! */
}
Uriah Nevins
1,121 PointsGianmarco is right. But if that does not work try using "clear: both;" to clear any other div's tho the right or left.
Uriah Nevins
1,121 PointsGianmarco is right. But if that does not work try using "clear: both;" to clear any other div's tho the right or left.
Emmanuel Rojas
6,994 Pointsthank you very much guys. It helped a lot