EDIT: There is almost the same question. Removing spaces between HTML elements when using line breaks , however, apart from the "float" clause, I do not find any of the answers that fit my requirements. I would like it to remain open to more innovative offers.
If you have a consistent inline-block white space becomes significant. It adds some level of space between the elements. What is the βrightβ way to avoid the white space effect in the HTML layout if you want these blocks to look at each other?
Example:
<span>a</span> <span>b</span>
It looks different:
<span>a</span><span>b</span>
because of the space between them. I want the whitespace effect to disappear without disrupting the layout of the HTML source. I want my HTML templates to stay clean and indented.
I think these options are ugly:
1) Fine-tuning text-indent , margin , padding , etc. (because it will depend on the font size, default white space width, etc.)
2) Putting just one line, next to each other.
3) Zero font-size . This will require overriding the font size in blocks that would otherwise be inherited.
4) Possible solutions for the entire document. I want the solution to remain local to a specific HTML block.
Any ideas, any obvious points that I'm missing?
html css
Sedat kapanoglu
source share