Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem that DIV should be centered under IE9 and the result shows that it is on the left?

Shulou Source: shulou.com Published: 2022-06-03 08:43:39 11月15日 Update

The main content of this article is to explain "how to solve the problem that DIV should be centered on the left under IE9". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to solve the problem that the DIV should be centered on the left under IE9."

The code is as follows:

Block 1

Block 2

It was supposed to be centered under IE9, but it turned out to be on the left.

Resolve:

1. In versions above IE9, you only need to set margin:0px auto; to center DIV.

two。 In versions below IE9, the following settings are required

The code is as follows:

Only the sub-div can be centered.

At this point, I believe you have a deeper understanding of "how to solve the problem that DIV should be centered on the left under IE9". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Results questions code content blocks versions learning practicality deeper interest practicality simplicity of operation methods more friends websites channels inquiries Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux NVidia macOS Shulou Information MariaDB