Reputation: 727
I have a class by this name →
.header-menu
which has been defined as →
.header-menu {
display: table-cell;
}
Now comes the question → what should I use for display property of →
.header-menu ul li
to arrange those elements inline.
I tried these →
display: inline-block
display: table-cell
display: inline
and both are fine, but semantically and authentically and in the sense of good practice which is the correct one keeping in mind the fact that base class is defined as →
.header-menu {display: table-cell}
Truth be told that both are working fine, but I want to know the best coding practice for this case.
Upvotes: 2
Views: 657
Reputation: 584
CSS styles are not semantic so you don't have to worry about that. It's more about what support you want. inline-block
and table-cell
are both supported up to 98% of browsers.
what should I use for display property of to arrange those elements inline.
Why not just use display: inline
?
Upvotes: 2