Home > Article > Web Front-end > Newbies have a few questions about css resolution_html/css_WEB-ITnose
I recently made a template. It can be displayed normally on my home computer, but on a machine with a higher resolution, the web page is on the left. I beg you all, do you have any solutions? I've seen other people make templates, and nothing like this happens! I really can’t think of it!
margin:0px auto;
Depending on how big your page is, you can limit the width through body
body{width:1000px;margin:0px auto; }
Take a look at the entire page width and center the entire page
Just use a percentage for the layout width
Generally, the content is placed in a div , set a width for the outer layer, such as 960px, and then center the outermost div margin:0 auto;
The above is very clear, add an outermost div
div inside the body Set a width, such as 1000px, and give the div an outer margin of margin:0 auto;
to center it