Allow resizing textarea in the lower left corner

Can I get a small widget of the size that appears in the lower right corner of the text areas (in modern browsers) to appear in the lower left corner?

+4
source share
3 answers

CSS3 adds the "resize" property, which allows you to control the resizing of the text field. But, as far as I can tell, there is no property that determines where the descriptor is located. If you need this level of control, you will have to implement the widget yourself using Javascript (similar to how the jQuery Dialog widget adds a resizing handle to the created DIV).

+2
source

This can be done by indicating the direction from right to left. This means that the text is right justified by default, but this can easily be overridden:

textarea { resize: both; direction: rtl; text-align: left; } 

There are other side effects that you cannot override. A vertical scroll bar will appear on the left. The cursor will be displayed on the left at times (after entering a neutral directional character), even the characters will be displayed on the right when you enter only the characters from left to right, mixed with neutral characters - although the neutral characters are first displayed on the left first (test with typing "abc (1) x "to understand what I mean).

Thus, it comes with features that are weird when entering text from left to right, and it is better to look for a different approach to the original problem (no matter what caused you to place the resize handle in the lower left corner).

+4
source

This should not have been done, because then the standard text fields would be very inconsistent and that the W3C is trying to avoid. The Internet needs to be consistent in some things, and the html textarea resize widget is likely to always be on the right. One thing you can do is use jQuery or other JavaScript methods to add a resize widget in the bottom left and cover the one that is in the bottom right.

0
source

Source: https://habr.com/ru/post/1435606/


All Articles