I'm currently trying to write code that centers a website for which the content is exactly 895 pixels wide, and I want it to be centered. So, I'm trying to write the following in CSS:
body {
...
padding-left: calc(([window width] - 895) / 2);
}
Is there a command which does that? is there a better way of doing this?
I have tried the following variable names: view-width vw screen screen.width screen-width
While I did not find how to make that specific bit of code work, I found another method of centering my website; I did so with: