I need to display three boxes in line consecutively, using the following code I get always a "gap" of few pixel between them.
I would like to know:
- How to have the box, one after another, no space? I know I can add some minus pixel but I am looking for a more consolidate solution
- Why this happen? Can I re-setter help to solve this problem?
- Do you know any other better alternative?
div {
box-sizing: border-box
}
.box {
width:50px;
height:50px;
background-color:red;
}
#a, #b, #c {
display:inline-block;
}
<div id="container">
<div id="a" class="box"></div>
<div id="b" class="box"></div>
<div id="c" class="box"></div>
</div>