0
Depending on how I write the code, the span element puts a spacing.
<div style="padding:20px; border:1px solid black; margin-bottom:16px;">
<span>1</span><span>2</span><span>3</span>
</div>
<div style="padding:20px; border:1px solid black;">
<span>1</span>
<span>2</span>
<span>3</span>
</div>
If you write span side by side it does not put a space between words. How do I make for the second div that has the broken spans to have the same result as the first?
Possible duplicate: Why line breaks between elements cause space between them?
– Valdeir Psr
I understood how this spacing works. Now I can’t find out how I can solve this.
– Heber Leonard
@Heberleonard, I was going to answer here, but as it is duplicated even (I had not noticed the comments), I put a another answer there. :)
– Luiz Felipe
Hello Heber, you can settle with
float
or withfont-size:0
in the parent element, see in detail how to do at: https://answall.com/a/172077/3635 or else using HTML comments<!-- -->
, see how it is with: https://answall.com/a/172266/3635– Guilherme Nascimento