简体   繁体   English

有两个 div 元素,它们之间没有空格

[英]Have two div elements with no space between them

I'm working on a website where I need to change the content of 2 div elements (add some text).我正在一个网站上工作,我需要更改 2 个 div 元素的内容(添加一些文本)。 Until now the 2 divs where glued together but when I did change their content an unexpected space appeared.到目前为止,两个 div 粘在一起,但是当我更改它们的内容时,出现了一个意想不到的空间。 Does someone know how do I prevent this space from appearing (using Css I suppose)?有人知道如何防止这个空间出现(我想使用 Css)?

In the absence of the html some guesswork is required here, but the likeliest answer is that one of the elements inside the div has a margin that extends beyond the div's boundary.在没有 html 的情况下,这里需要进行一些猜测,但最可能的答案是 div 内的元素之一具有超出 div 边界的边距。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM