David David - 17 days ago 6
CSS Question

preventing text from reaching the right side of the textarea, reserving space for vertical scroll bar, which will not move the text when appears

I have a textarea which when typing some text into, after so many line you get a vertical scroll bar which moves text a bit to the left because it needs space for itself.

How can I reserve that area on the right side of textarea where the scroll bar will appear so that nothing will be written there?

I have tried applying

padding-right
to textarea but it moves the scroll bar itself to the left.

Answer

Not an exact answer, but you might want to go completely scrollbar-less - Autosize jQuery

Comments