In an HTML page, we sometimes need to let the contents of the div out of the box automatically show the scroll bar, we can set this:
The code is as follows:
<div class= "Classlist" >
<div class= "AutoScroll" >
<asp:radiobuttonlist id= "rblclasses" runat= "Server" datatextfield= "ClassName" datavaluefield= "ClassID"
Forecolor= "#FF4040" >
</asp:RadioButtonList>
<asp:imagebutton id= "imgsure" runat= "Server" imageurl= "~/images/c_sure.jpg"/>
<asp:imagebutton id= "Imgclose" runat= "Server" imageurl= "~/images/c_close.jpg"/>
</div>
</div>
Then, in the style, this setting:
The code is as follows:
<style type= "Text/css" >
. classlist
{
width:300px;
height:20px;
}
. AutoScroll
{
width:300px;
height:100px;
Overflow:auto;
}
#rblClasses
{
margin-left:20px;
}
</style>
After setting, when the content displayed in the RadioButton exceeds the outermost div, the scroll bar is automatically displayed, that is, the nested div