CSS CSS Layout Basics Controlling Layout with CSS Display Modes Using Inline-Block to Set Width, Height, Top and Bottom Margin and Padding

Tilmann Pusch
Tilmann Pusch
2,394 Points

Why would I use inline instead of inline-block?

As far as I understood, inline-block = inline + the advantages of defining width, height etc. So why would I ever want to use just the "display: inline;" and not always use "display: inline-block;" instead?

1 Answer

Bryan Peters
Bryan Peters
11,996 Points

Similar question and responses here

inline also has slight better browser support than inline-block.

Tilmann Pusch
Tilmann Pusch
2,394 Points

Hi Bryan Peters, thank you very much!