In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you how to solve the margin:0pxauto center problem, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
To describe the problem of margin:0pxauto centering, using margin:0pxauto; centering is the most commonly used method when doing cssdiv positioning. The content summarized here can be used normally under ie67 and fifefox.
Margin:0pxauto centering problem
Margin:0pxauto; is suitable for div and other elements, such as pforce IMG and so on.
Using margin:0pxauto; to center is the most common method for people to do cssdiv positioning, but according to my own use process, there are often cases where the center is not available. The content summarized in this article can be used normally under ie67 and fifefox.
Let's break it down one by one:
1: mixed with margin:100px, it cannot be centered.
In this case, because margin:0pxauto;, is set in front and margin:100px is set after it, this is obviously contradictory, and not only that, it doesn't work if you use both margin:0pxauto; and float:left.
2: no DOCTYPE specified.
DOCTYPE specifies which standard the browser uses to parse html code, and if it is not specified, it will most likely not take effect.
We often see people who write html and start with it directly. In this case, all we have to do is add a DOCTYPE header. * create a new html header directly from the dw, and then modify it. The complete html header is as follows:
Untitled document topic content
There is code before 3:DOCTYPE, which does not take effect.
I gave it a try, as long as
When such a comment is added before this sentence, there is also a situation where margin:0pxauto; cannot be centered.
4: use text-align:center.
This is the next step, if the above margin:0pxauto; does not work, then add text-align:center; to the body, so that it is not only div, but also the text will be centered.
Then you can go to the refined css, and then set the corresponding container to text-align:left to achieve the effect of text to the left.
The above content is how to solve the problem of margin:0pxauto center. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.