I noticed it just now, when creating something. There was that extra bottom padding on textarea
, even though I put box-sizing: border-box;
for it.
I couldn't see what's that empty space using box-model inspector. Then, I remembered the scrollbar
.
The extra bottom padding on textarea
on Firefox is actually the (hidden) bottom horizontal scroller bar. It's displayed as empty space if we didn't declare the overflow
property.
Here's a list about the textarea
's overflow
property
If you want both x and y scrollbar
s to always appear
Making both x and y scrollbar
s to disappear
Hide y scrollbar
but not the x
SOLUTION: Make the x scrollbar
to disappear but let the y one
I think that's kind of a display "bug" on Firefox. Or not, I'm not sure.
Because by default (on Chrome, for instance), textarea
's overflow
property is set to auto
.
The auto
means when there's no overflowing stuffs from the element (textarea
), no scrollbar
or extra empty space will be shown.
Sort of.
Anyway, as I strolled around on the web, the overflow: auto;
property has "weird" behavior on textarea
on any browser, not just Firefox.
In Conclusion
overflow
property for the textarea
element to remove that bottom empty space.
No comments:
Post a Comment
Tell me what you think...