html - How do I make a contenteditable='false' div have the same height as a contenteditable='true'? -
i have div that's been used "input" using contenteditable
, , works great when enabled. there's 1 scenario need disable "input" setting contenteditable='false'
, makes div lose height (as can see in this jsfiddle).
<div contenteditable="true" class="visible-borders"></div> <div contenteditable="false" class="visible-borders"></div>
do guys have solution that? wanted didn't involve min-height
. , no, cannot change code use other contenteditable
. i'm using else's code.
this because contenteditable=false
div has no content , nothing holding open, whereas content-editable element has default styling shows editable (specifically: -webkit-user-modify: read-write
)
you give .visible-borders
min-height. if (for unspecified reason) don't want use min-height, insert pseudo content:
.visible-borders:before { content: "\00a0" }
Comments
Post a Comment