The method of adding a horizontal scroll bar to a table in jsp is as follows:

Source: Internet
Author: User

The method of adding a horizontal scroll bar to a table in jsp is as follows:

First, the bootstrap framework is used in this project, so some people will say that you can set the adaptive attribute for the table.

Which of the following statements is true?

The adaptive bootsrtap is used to display a horizontal scroll bar when the browser is not full but half of the screen.

What if the number of columns increases when we maximize the number of browsers? What will happen?

The answer is the squeeze effect, and the scroll bar does not appear in the horizontal direction.

Looking at the tutorials on the Internet, many people say that the parent div is set to 100%, and the scrool attribute cannot be added to the table.

Here, the solution is simple. Set the attribute of the <th> label so that it does not wrap automatically.

$ (Document). ready (function () {$ ("th" ).css ("white-space", "nowrap ");});

To set the attributes that the th tag does not allow to wrap automatically after page loading.

Note that this attribute is used in css, which is different from that used in the th tag. the method used in the th tag is as follows:

<Th nowrap = "nowrap"> You can also disable automatic line feed.

The above is all the content of the jsp method used to add horizontal scroll bars to tables. I hope it will be helpful to you and provide more support for the help house ~

Related Article

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.