Why did changing the font size and line height ruin my HTML layout?

I could post the code if it was useful (but it is a lot). Basically, if I change the line size or font size to a really big value, it breaks my html layout - in particular, my DIVs seem to get bigger ... But I don't have text in these divs.

+3
source share
1 answer

Any inline element will pay attention to line-height:

In an element of a block container whose contents are composed of line-level elements, "line-height" indicates the minimum height of the lines of the line inside the element.

<img> ( ) <div> ( ).

font-size line-height, line-height: normal, :

"" .

, font-size, line-height , .

+5

Source: https://habr.com/ru/post/1792957/


All Articles