I could be wrong but it looks like you have this css:
html, body {
text-align: center; /* This right here */
background-color: #303030;
color: #dddddd;
font-family: sans-serif;
font-weight: bold;
margin: 50px;
}
and since the button (button2) in inside the body everything is centered. So you may want to change that.
I tried @ValiantWind’s code and it works so I’d recommend it.
If a child element is assigned a different property than the one on its parent property (assuming the child element supports the said property), text align for the div will override the text align for the body.
Think of the properties of a parent element as the default, which will only change the value for the child element that overrides it.