I'm having some problems in trying to distinguish the difference between display: block
and display: inline-block
in the example of horizontal menu.
My fiddle: https://jsfiddle.net/4dg0ukk6/
The following lines of code is extracted from the fiddle link mentioned above
li a {
display: block;
color: white;
text-align: center;
padding: 16px;
text-decoration: none;
}
Should I use display: block
or display: inline-block
? As I see the result is almost the same. What is exactly the difference between them in this case?