So I am currently making a website for a friend of mine and I have set the left and right margin to 80px. This works for everything but my main body. It seems that it expands past the right margin, and simply has a margin of 60px instead of 80px.
Here is a screenshot: http://i.imgur.com/XtRdlUv.png
EDIT: I cut off some of the left margin, sorry for the confusion
As seen with the red arrow, there seems to be an offset when their shouldn't.
Here is my code:
body { background: url(image) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; background-size: cover; text-align: center; margin-left: 80px; margin-right: 100px; } .wrapper { padding-top: 10px; text-align: left; margin: 0px auto; } .mainbody { width: 100%; outline: #293135 solid; background-color: #444444; margin-top: 40px; text-align: left; padding: 20px; color: #FFFFFF; } <div class="mainbody" style="text-align: center"> <font face="Arial, Helvetica, sans" size="4"> <h1 style="text-decoration: underline">Download</h1> <p>Features Include:</p> </font> </div>
width: 100%+padding: 20px, which makes a width of100% + 40px. Look intobox-sizing: border-box. And use the devtools to hilite elements' sizes. jsfiddle.net/rudiedirkx/pbqn33og