The scroll bar is automatically displayed when the excess part is set in html.

Source: Internet
Author: User

In html pages, we sometimes need to automatically display the scroll bar when the content in the div exceeds the limit. We can set it as follows: [csharp] <div class = "classlist"> <div class = "autoScroll"> <asp: radioButtonList ID = "rblClasses" runat = "server" DataTextField = "className" DataValueField = "classID" ForeColor = "# FF4040"> </asp: radioButtonList> <br/> <asp: ImageButton ID = "imgSure" runat = "server" ImageUrl = "~ /Images/c_sure.jpg "/> <asp: ImageButton ID =" imgClose "runat =" server "ImageUrl = "~ /Images/c_close.jpg "/> </div> and set it in the style as follows: [css] <style type =" text/css ">. classlist {width: 300px; height: 20px ;}. autoScroll {width: 300px; height: 100px; overflow: auto ;}# after rblClasses {margin-left: 20px ;}</style> is set, when the content displayed in radiobutton exceeds the peripheral div, the scroll bar is automatically displayed, that is, the nested div.

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.