Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Space between inline-block elements Reply To: Space between inline-block elements

#149739
__
Participant

I’m not sure what the ‘empty span’ is doing in there, it doesn’t seem to serve any useful purpose.

It forces the line to wrap (so the “useful” elements are justified, instead of left-aligned). I would suggest using a psuedo-element, instead, however:

#container:after{
    content:'';
    display:inline-block;
    height:0;
    margin:0;
    width:100%;
}

demo