Hi everyone, I ran into a problem, there is a make-up, 3 divas, 1 of them is overflow: hidden, because of which the baseline of the container is traveling. How to align the blocks in one line? Sample layout added here: https://jsfiddle.net/ap11fxod/1/
.a { height: 29px; width: 500px; background: #f231ad; line-height: 29px; padding: 0 10px; } .a > div { display: inline-block; } .b { overflow: hidden; max-width: 370px; white-space: nowrap; font-size: 18px; color: #FFF; } .c { font-size: 14px; padding: 0 5px; } .d { font-size: 12px; padding: 0 5px; }
<div class='a'> <div class='b'> БОЛЬШОЙ ОСНОВНОЙ ТЕКСТ БОЛЬШОЙ ОСНОВНОЙ ТЕКСТ БОЛЬШОЙ ОСНОВНОЙ ТЕКСТ БОЛЬШОЙ ОСНОВНОЙ ТЕКСТ БОЛЬШОЙ ОСНОВНОЙ ТЕКСТ БОЛЬШОЙ ОСНОВНОЙ ТЕКСТ БОЛЬШОЙ ОСНОВНОЙ ТЕКСТ БОЛЬШОЙ ОСНОВНОЙ ТЕКСТ </div> <div class='c'> Текст 1 </div> <div class='d'> Текст 2 </div> </div>
.a > div { display: inline-block; }
.a > div { display: inline-block; }
take the inline block and set thefloat: left;
- Ivan Karaman