P
P
pipanchik2015-11-21 10:47:52
css
pipanchik, 2015-11-21 10:47:52

How to fix lists inside block with contenteditable in chrome?

There is a block with contenteditable, inside there is text with drop-down lists in which list items with long names.

<div contenteditable="true">
    text text text text text <select><option>bigbigbigbigbigbigbig</option></select> text text text text text text text 
</div>

For the list, I set the maximum width
select {
    max-width: 40px;
}

and I get inadequate block height in chrome:
f2f8e14487d64f509849229fca8ae4de.png
although it works fine in FF:
684a0e0aad7d4c3b8b6ce4d573910073.png
How to overcome this problem?
Example in jsfiddle

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pipanchik, 2015-11-21
@pipanchik

solved

select {
  max-width: 40px;
  word-wrap: normal;
}

or
select {
  max-width: 40px;
  vertical-align:top;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question