The solution of void problem in IE picture set _css/html

Source: Internet
Author: User
See ask this question a lot, so take a moment to tidy up, welcome everyone to comment, do the supplementary changes, thank you!
The problem is as follows:
<textarea id="runcode25400"><style> Div {width:500px; border:1px solid #f00; background: #000;} </style></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
Workaround: First, change the arrangement of the HTML
<textarea id="runcode17114"><style> Div {width:500px; border:1px solid #f00; background: #000;} </style></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
solution: Two, Display:block
<textarea id="runcode95088"><style> Div {width:500px; border:1px solid #f00; background: #000;} img {display:block} </style></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
workaround: Three, negative
<textarea id="runcode34609"><style> Div {width:500px; border:1px solid #f00; background: #000;} img {margin-bottom:-5px} div>img {Margi n-bottom:0} </style></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
Workaround: Four, font size
<textarea id="runcode16046"><style> Div {width:500px; border:1px solid #f00; background: #000; font-size:0} </style></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
Workaround: V. Vertical-align:bottom
<textarea id="runcode71735"><style> Div {width:500px; border:1px solid #f00; background: #000} img {Vertical-align:bottom} </style> </textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
I'm still the old way, set line-height:0
  • 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.