The block-level label contains the 3px interval at the bottom of the intra-row label,

Source: Internet
Author: User

The block-level label contains the 3px interval at the bottom of the intra-row label,

When a block-level label (such as div) contains a line label (such as img), the outer element and the bottom of the inner element are separated by 3 px;

The Code is as follows:

<! Doctype html>  

The display effect is as follows:

There are three solutions:

1. Set div {font-size: 0}; set the font-size of the block-level label to 0;

2. Set img {display: block}. Set the display of the label in the inner row to block and change it to a block-level label;

3. Set img {vertical-align: top ;}; and set vertical-align of the label in the inner row to top;

 

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.