小组干扰分区

时间:2012-06-17 06:22:12

标签: asp.net html css

我有这个Default.aspx设计

<head runat="server">
    <title></title>
    <style type="text/css">
        .heading
        {
            text-align: center;
            border-style: double;
            background-color:#F2A988;
            font-family:Sans-Serif;
            font-weight:bold;

        }
        #wrapper {
            margin: 0 auto;
            width: 400px; 
            text-align:left;
        }
        .style1
        {
            text-align: center;
            font-family:Sans-Serif;
        }
        .style2
        {
            font-family: Arial, Helvetica, sans-serif;
        }
    </style>
</head>
<body style="height: 642px; width: 911px; " id="wrapper">
    <form id="form1" runat="server">

    <div class="heading">
        Sheridan Computer Club - Inquiry Form</div>
        <br />

    <asp:Calendar ID="Calendar1" runat="server" Font-Names="Arial"></asp:Calendar>



        <br />

    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Button ID="btnInfo" runat="server" Font-Names="Arial" 
        onclick="btnInfo_Click" style="font-weight: 700" 
        Text="I'd like to receive more information!" Width="261px" />
    <asp:Panel ID="form" runat="server" Height="259px" Width="392px" 
        Visible="False">
        <span class="style2">If you would like to join the club or receive more 
        information about the club fill in the form below &amp; click submit button.<br />
        <br />
        </span><b>
        <asp:Label ID="Label1" runat="server" Font-Names="Arial" Text="First Name:"></asp:Label>
        &nbsp; </b>
        <asp:TextBox ID="TextBox1" runat="server" Width="184px"></asp:TextBox>
    </asp:Panel>

    <div id="meeting" 


        style="position:relative; top: -359px; left: 339px; width: 232px; height: 64px; text-align: center; margin-top: 0px; font-family: Arial; font-weight:bold;">
        <br />
&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Label ID="lblDate" runat="server"></asp:Label>
        <br />
        </div>



    <div style="width: 308px; position:relative; top: -552px; left: 307px; margin-top: 0px;" 
        class="style1">
        Click Below to find out when
        <br />
        the club meets next</div>

    <div style="position:relative; top: -591px; left: 646px; width: 274px; height: 289px; font-family:Sans-Serif;">
        <b>View Members by Program:<br />
        <asp:ListBox ID="ListBox1" runat="server" Height="175px" Width="263px">
        </asp:ListBox>
        </b></div>

    <div style="position:relative; top: -797px; left: 351px; width: 192px; height: 32px; text-align: center; margin-top: 0px;">
        <asp:Button ID="Button1" runat="server" Text="Next Meeting" 
            onclick="Button1_Click" />
    </div>

    </form>
</body>
</html>

问题是,面板干扰了我放置的div,只有在我点击了我不想要的按钮后才会加载Div。我正在做的是点击隐藏按钮本身的按钮&amp;显示包含提交表单的面板。

以下是我正在使用的button_click的代码,

protected void btnInfo_Click(object sender, EventArgs e)
    {
        btnInfo.Visible = false;
        form.Visible = true;
    }

我无法弄清楚出了什么问题?

1 个答案:

答案 0 :(得分:0)

我认为这与您的position:relative样式元素有关。

查看创建css列并将列表框浮动到日历右侧。

Create a two column layout guide