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!
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

lukerucker
1,754 PointsButton Centering Issue
Hi, So I got a school project for making a Dichotomous Key, and I decided to make my project into a website instead of printing it out on paper. I have 4 pages, a picture page with all the pictures for the key on, a page for the actual key, a page for the answers not yet revealed, and a button that links that to the fourth page which has the answers revealed and vice versa. I can't seem to figure out how to center that button so it looks cleaner.
<a href="real_answer.html"><button id="button">Show</button></a>
/* Button Styling */
#button {
background-color: #6ab47b;
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
border: 5px solid #599a68;
padding: 5px;
}
/* Button Font */
#button {
font-family: 'Changa One', sans-serif;
margin : 3px 0;
font-size: 1em;
font-weight: normal;
line-height: 0.8em;
color: #fff;
}
Thanks!
1 Answer

lukerucker
1,754 PointsP.S. I am following along and modifying the page of the "How to Make a Website" course.
erdragerdragsson
Courses Plus Student 5,887 Pointserdragerdragsson
Courses Plus Student 5,887 Pointstry
margin: 0 auto;
or
text-align:center;