Gunnar Bittersmann: Gestaltung des Layouts mit display: und prozentangaben

Beitrag lesen

@@Bobo Boberg

Bei inline-Elementen, dazu gehört auch inline-block, kannst du die Höhe nur durch line-height festlegen

Da irrst du.

siehe https://www.w3.org/TR/CSS21/visuren.html#inline-boxes, https://www.w3.org/TR/CSS21/visudet.html#the-height-property

Ebenda steht: “'height' … Applies to: all elements but non-replaced inline elements, table columns, and column groups”

Die height-Eigenschaft wirkt also auf Elemente mit display: inline-block.

und https://www.w3.org/TR/CSS21/visudet.html#inline-non-replaced

Wenn du da ein kleines Stückchen hochscrollst, siehst du, dass 1. inline, non-replaced elements was anderes ist als 9. 'inline-block', non-replaced elements.

LLAP 🖖

--
“You might believe there are benefits for the developer, but first of all, you should put those behind the interest of the user.” —Stefan Tilkov
Selfcode: sh:) fo:} ch:? rl:) br:> n4:& va:| de:> zu:} fl:{ ss:| ls:# js:|