Get the App
SLTechnology News&Howtos  ›  Development  › 

How to set margin and padding to 0 to remove the whitespace of DIV and DIV

Shulou Source: shulou.com Published: 2022-06-03 08:43:38 10月02日 Update

This article mainly explains how to set margin and padding to 0 to remove the blank space between DIV and DIV. Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to set margin and padding to 0 to remove the blank space between DIV and DIV.

Left and right center code in div

Text-align:center; (horizontal) vertical-align:middle; (vertical)

Line-height:30px; (30px is the same height as the set div)

How to remove the whitespace between DIV and DIV

Status description:

1) how is there a blank line between and?

2) the problem of blank space between div pictures and pictures?

3) Why are margin:0; and padding:0; set up between div and div, but still blank under iE6?

4) how do I remove the gap between div?

5) is there a gap between two div?

Solution:

1) set margin and padding to 0

2) add overflow:hidden to the div style with height set

At this point, I believe you have a deeper understanding of "how to set margin and padding to 0 to remove the blank space between DIV and DIV". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: White space between content picture direction learning practical deeper two center left code interest method practicality practical simple operation method more friends style Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information OPPO Reno MariaDB MySQL Huawei