How to implement display: inline-block for block elements in IE

Source: Internet
Author: User

Extended question: how can I implement the display: inline-block effect for block elements in ie?

There are two methods:

1. Use the display: inline-block attribute to trigger the block element first, and then define the display: inline, let the block element be presented as an inline object (the two displays must be placed in two css tutorial declarations first, which is a classic bug in ie. If the display: inline-block is defined first, then set the display back to inline or block, and layout will not disappear ).

The code is as follows (... For other omitted attribute content, Firefox is not easy to use ):
Div {display: inline-block ;...}
Div {display: inline ;}


2. Set the block element to inline object submission (set the attribute display: inline), and then trigger the layout of the block element (for example, zoom: 1). Firefox is not easy to use ).

The code is as follows:
Div {display: inline; zoom: 1 ;...}

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.