As you see the outline is collapsed in the following sample:
DEMOCode:var input = document.getElementById('input'); var output = document.getElementById('output'); input.addEventListener('input', function() { output.value = input.value; }); output { display: block; font: 20px Arial; outline: 1px solid green; } <input id="input"> <output id="output"></output>
How can I prevent it? Do I need to give the output a fixed height? If so, what value should I give to the height if I want it to be just as high as the text height — not an arbitrary number? Is there a cross-browser solution?



Reply With Quote


Bookmarks