开发者

How can I remove this scrollbar?

I am working on visual studio 2010. The code was running perfectly but, suddenly I don't know why a horizontal scroll bar appeared. Does anyone have any idea how to remove the scroll bar. Below is my code. Thanks for your help

<%@ Page Title="Reports" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Reports.aspx.cs" Inherits="F.Reports" %>

<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <title></title>
    <link type="text/css" rel="Stylesheet" href="Styles/jquery-ui-1.8.16.custom.css" />
    <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.4.4.js"></script>
    <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $(".dateFrom").datepicker({ dateFormat: 'dd/mm/yy' });
            $(".dateTo").datepicker({ dateFormat: 'dd/mm/yy' });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
     Reports</h2>
    <div id="Div4" style="position: absolute; left: 310px; margin-top: 40px;">
        <h3>
            From Date
        </h3>
        <asp:TextBox ID="DateField" class="dateFrom" runat="server" autocomplete="off"></asp:TextBox>

    </div>
    <div id="Div3" style="position: absolute; left: 500px; margin-top: 40px;">
        <h3>
            To Date
        </h3>
        <asp:TextBox ID="DateField2" class="dateTo" runat="server" autocomplete="off">
        </asp:TextBox>

    </div>
    <div id="Div1" style="position: absolute; left: 0px; margin-top: 40px; right: 295px;">
        <h3>
            Choose Report</h3>
        <asp:DropDownList ID="ReportDropDownList" runat="server">
            <asp:ListItem Value="0">Report1</asp:ListItem>
            <asp:ListItem Value="1">Report2</asp:ListItem>
            <asp:ListItem Value="2">Report3 </asp:ListItem>
           </asp:DropDownList>
    </div>
    <div id="Div2" style="position: relative; left: 690px; margin-top: 55px;">
        <asp:Button ID开发者_开发知识库="GenerateReportButton" runat="server" Text="OK" OnClick="GenerateReportButton_Click" />
    </div>
</asp:Content>


In order to hide the horizontal scroll bar in a webbrowser, you can insert style="overflow-x:hidden" into the <html> tag, but not in the <body> tag.

i.e. <html style="overflow-x:hidden"> will allow you to disable the horizontal scroll bar

i.e. <body style="overflow-x:hidden"> will not yield the disable effect


Set overflow: hidden;. Otherwise, Setting overflow: auto will cause scrollbars to show whenever they are needed.

That should fix it.


You could use the CSS style overflow: hidden; to remove the scrollbar. The information that doesnt fit in the DIV wont be displayed. You can also remove the fixed div height to solve the problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜