body {
padding: 4% 16%;
margin-top: 40%;
margin-bottom: auto;
border: 12px double darkred;
background-color: #FAFCB4;
}
p {
font-size: 0.8em; /* You should be using "em"*/
text-align: justify;
}
@media only screen and (min-width:768px) {
/* For desktop: */
body {position: absolute;
padding: 6% 18%;
}
p {
font-size: 1em;
}
<div style="margin:auto; max-width:525px;">
Lorem ipsum. This is a test. Lorem ipsum. This is a test. Lorem ipsum. This is a test. Lorem ipsum. This is a test. Lorem ipsum. This is a test. Lorem ipsum. This is a test.</div>
You should attempt to use "em" as opposed to percents for your font sizes. The user will have a font size set, and em is a value of 1, or 100% of that size. So effectively, .8 em is 80% of the user's font size. Details on "em" can be found here: (http://www.w3schools.com/cssref/css_units.asp)
Also, you can write multiple styles within one element in your css. You'll want to do that in the future as it is a more effective, and more efficient styling method in your CSS.
Lastly, I margin'd the element from the top @ 40%. This takes into assumption your element you're verically centering will be about 10-20% of the page. If it is 10%, the line:
margin-bottom:auto;
This will set the bottom margin automatically to the remaining 50%, approximately centering the element. Add or subtract from the 40% until you're styled where you'd like vertically. If your element is 20%, you'll be perfectly centered. Cheers! Hope it helps! ;)