E
E
eldar_web2015-11-09 15:32:02
css
eldar_web, 2015-11-09 15:32:02

Which is better to use float:left or display:inline-block?

If you use display:inline-block, then there is 5px of space between elements. Why is that?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail, 2015-11-09
Chirskiy @chirskiy_mixail

God, how can you compare float and inline-block, make it on float, with blocks of different heights, the same as on inline-block, I think it's no secret to anyone that there will be holes with float, but everything will be beautiful with inline-block and neat. I did not see the use of word-spacing
in your examples. Example: jsfiddle.net/7ha9ca9y
I advise everyone to inline-block, because everything is easier with adaptive, and you don’t need to reset float: none; everything will work as it should, you need to align it in the center, for God's sake, there is no problem on the right edge, but with your floats: it's just the year 2000, you need to use a new one, now there is generally flex, I think when everyone smokes it, all sites will be remade under him.

A
Alexey Ukolov, 2015-11-09
@alexey-m-ukolov

How to "move" menu items to each other?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question