Today I had some free time to write a website for my own homepage, which is compatible with all browsers (mainly IE 9 and above and Chrome). There is a previous problem which is also a very common problem. Since I have encountered it, I might as well record it. Let’s look at the question directly <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Document Title</title> </head> <body> <div class="aaa"> <div> </div> </div> </body> </html> <style> .aaa{ width:700px; height:500px; position:absolute; background-color:red; display: flex; align-items: center; } .aaa div{ height: 200px; width:200px; position: absolute; background-color:yellow; } </style> Prerequisite: The sub-element needs to be centered horizontally, but In IE: The properties in the parent container: Chrome: Properties in the parent container: The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. |
<<: Write your HTML like this to make your code more compatible
>>: How to modify the default storage location of Docker images (solution)
Table of contents Preface 1. Nginx installation 1...
Block-level element features : •Always occupies a ...
1. Form 1. The role of the form HTML forms are us...
Today I found a problem in HTML. There are many d...
Table of contents Preface Introduction to Dockerf...
As shown below: #!/usr/bin/env python3.5 import p...
1. this.$router.push() 1. Vue <template> &l...
Table of contents Preface webpack-deb-server webp...
This article introduces the sample code of CSS3 t...
1. Install tomcat8 with docker 1. Find the tomcat...
Compared with vue2, vue3 has an additional concep...
In the previous article [Detailed explanation of ...
Commonly used commands for Linux partitions: fdis...
Recently, I plan to deploy a cloud disk on my hom...
1. Subquery MySQL 4.1 and above support subquerie...