Vertically and horizontally centered dimension Adaptive Elements

Source: Internet
Author: User

Vertically and horizontally centered dimension Adaptive Elements

Vertically and horizontally centered dimension Adaptive elements:

If the size of the child element is fixed, it is easier to set it to vertical and horizontal center, for details, refer to the Code section of css implementation div horizontal vertical center. If the size of the child element is not fixed, it is a bit difficult to set it to vertical center. Let's take a look at the code example below:

<! DOCTYPE html>  

The Code implements what we want, but the disadvantage in the US is that it is not compatible with earlier versions of IE browsers. However, over time, earlier browsers can be used in large quantities after they exit the market, of course, JavaScript can be used to ensure compatibility with all browsers. For details, refer to the section on compatibility with the vertical and horizontal elements of all browsers.

Original address: http://www.51texiao.cn/HTML5jiaocheng/2015/0521/2140.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.