N
N
Nwton2018-03-27 05:12:41
css
Nwton, 2018-03-27 05:12:41

Column blocks adaptive by content?

It is necessary to make a column of blocks. Such that the width of the blocks is the width of the content, and not the entire parent. The task is quite simple, there are a lot of solutions, but in all cases you have to use a wrapper. How to implement without wrapper, with one attachment? It is acceptable to wrap all blocks in one wrapper, but not each individually.
Wrapped example: https://jsfiddle.net/5busro5r
Desired HTML output: https://jsfiddle.net/5busro5r/1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gerasimov, 2018-03-27
@mrTeo

Use the white-space property on the block with the nowrap parameter - htmlbook.ru/css/white-space
Or use the button tag instead of div

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question