Newbies have a few questions about css resolution_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:47:49
Original
1207 people have browsed it

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!


Reply to discussion (solution)

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;


Here is the official content

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


This DIV contains all your content


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!