Oh well, I'm not sure we can get there from here then. I mean missing the right padding inside is no big deal, and neither is the persistence of it atop and below the scrollbar. Firefox is within its rights to see the padding as outside the scrollbar, after all padding only needs to be at the edge of the element. Who's to say if that edge is before or after the scrollbar?
If you want an exact rendering you may have to take a different approach, and then things get at least a bit more complicated.
A division, possibly two nested divisions might work with or if you're lucky, without javascript. You would have to make the the one with the text contentEditable, and I'm not sure how cross browser that is without javascript.
If it's part of a form that is to be submitted, javascript would be required to get the text which would now be the element's innerHTML, rather than its value.
Even with all that it might still be a bit tricky to get it to layout exactly as desired.
That said, this seems promising:
Code:
<!DOCTYPE html>
<html>
<head>
<title>Sample Editable Division</title>
<style type="text/css">
* {width:100%; height:100%; margin:0; border:0; padding:0; background:#D3D3D3;}
div {overflow:auto; box-sizing:border-box; -moz-box-sizing:border-box; padding:6px; font: normal 95% consolas, monospace;}
</style>
</head>
<body>
<div contenteditable>This is some text.</div>
</body>
</html>
But as I say it won't submit it's content as part of a form submission without a javascript assist.
Bookmarks