The vertical horizontal center below IE 8

Source: Internet
Author: User
<style>.box{width:300px; height:300px; background: #ccc; text-align:center;}. line{display:inline-block; height:100%; width:0px; vertical-align:middle;}. asas{Display:inline-block;} </style>

In fact, there is a way to implement the content of the:<button></button> tag automatically center, but this writing needs to modify the style, the General people will not use this way, because it does not conform to the front-end code design ideas.

IE6 you want to center the content

. Building{width:100%;height:100%;text-align:center;}
<div class= "Building" >

</div>

After my test margin:0,auto; it's useless to pay attention.


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. I hope you have a lot of support!

The vertical horizontal center below IE 8

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.