Putting block div into css

It also means that the horizontal space between those elements cannot be guaranteed to be exactly the same between browsers as it will depend on things like font-size word-spacing and browser defaults. The space will also be affected if the tags touch as the white-space will be negated or if a parent has a different font-size of has display of table which kills the white-space in some browsers.

However, in most cases the white space is not an issue unless you are going for pixel precision and then inline-block is not the best choice for this layout. Floats do not suffer the same problems with vertical-alignment or white space between nodes but of course have other peculiarities. Flexbox would also be useful here.

1 Like