In-Row Element display: block followed by IE

Source: Internet
Author: User

It is very easy to start a blog. It is difficult to maintain a good blog, and the job is a little busy. It has not been updated for a long time. Although I have made some fake things, however, in order to review the mistakes you have made in the future, you still want to record the mistakes you have made, so as not to repeat the mistakes you have made next time.

After an element in a row is converted into a block, the element in the row is converted into a block element in browsers such as chrome and ff, today, when dealing with a bug, we found that in IE7, we still regard this element as an in-Row Element and treat it as an in-Row Element;

1 <style type = "text/CSS"> 2. box {text-align: center;} 3. block {display: block; width: 100px; Height: 100px; Background-color: # F40; text-align: center;} 4 </style>
<Div class = "box"> <a href = "#" class = "Block"> no center! </A> </div>

In IE7, element a is centered. In this way, I think that this element is still regarded by the browser as an in-Row Element under IE7. I don't know whether it is true or not. I didn't test IE6. It should be the same as IE7. You are welcome to make a brick, correction is welcome.

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.