[CSS] prohibits Google browsers from allowing you to define and adjust multi-line text boxes and google multiple lines.

Source: Internet
Author: User

[CSS] prohibits Google browsers from allowing you to define and adjust multi-line text boxes and google multiple lines.

As we all know, you cannot adjust the multi-line text box Textarea by yourself. For example, if you want to adjust it, you need to write a lot of scripts:


This is good, because in many cases, we do not need to open it to users to adjust the text box. We usually only need to set the col and row attributes to fix their size.

However, Google Chrome, for, a common:

<textarea></textarea>
It can be easily adjusted, as shown in the following figure:


This will drag the layout of our page, sometimes debugging does not know what is going on, I thought the style was not written,

You may think this is Google's fault. Who told the user to be able to tamper with this multi-line text box?

However, we can do a better job. After adding style = "resize: none" to the end, users cannot drag in Google's browser, such as the text box on the right.

The above two figures are actually the following code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">We can see that style = "resize: none" has no effect on IE.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.