How to solve the problem of non-centering of web pages by css
This article will explain in detail how to solve the problem of web page not centered by css. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Does the div+css agency web page organize non-centered notices and intentions in Google Reader?
In other readers, the DIV agency web page is in the middle, but the main form of the web page is on the left in Google dabbling device, not in the middle.
Screenshot of the left-leaning effect of the web page structure
In browsers such as IE6\ IE7\ IE8, the web page structure is in the middle, but in readers such as google Reader (Google Chrome), the machine is displayed on the left, not in the middle. Cut back on reading: css pen and ink center
It is easy to manage this layout compatibility problem, we only need to set the equipment on the outermost DIV machine box to set the CSS mechanism center attribute.
Important inserts in the CSS code:
Margin:0 auto
EXP assumes that the outermost CSS is named "# warp" and the width of the CSS is 1000px.
# warp {width:1000px}
How the box will be centrally revealed in IE browsers, but in some browsers will not flash in the middle of Google Reader, the agency will point to the left.
At this time, if we get involved in the margin:0 auto style, all readers will be centered and exposed.
# warp {width:1000px;margin:0 auto} this is the end of the article on "how to solve the problem of css not centered in web pages". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.