I’m using inplace edit plugin that needs a block element in order to know which element is editable when clicked. I’ve done it that way in ASP .NET:
<div class="editable-alias" style="background-color: red; width: 100%;"><%# ViewModel.Alias %></div>
However if ViewModel.Alias is empty, then surrounding <div> is empty, and as a result its width is 0, and it’s impossible to click it. Is there a way to style that div (or perhaps span with inline-block) to have width even if it do not have content?
Try;
You may also specify a
min-heightalong with this