1

我的页面设置顶行有一列,第二行分为两列,最后一行也只有一列。

我的 Ajax 手风琴在第二行的第二列,在第一列,我有我的导航,导航页面在母版页上,所以它在每个页面上。手风琴位于内容占位符中,因此它只出现在一页上。

我遇到的问题是当我在带有手风琴的页面上时,当我展开第一个窗格时,它会像预期的那样将其他窗格向下推,但与此同时,导航也会向下移动。当我折叠它时,它会重新向上移动。当我展开第二个窗格时,它只会按预期移动手风琴。

这只发生在 2 个浏览器上:Firefox 和 IE。我在chrome上没有遇到这个问题。

如果我可以进一步澄清任何事情,我会尽力而为,如果您需要任何代码片段,我会根据需要提供它们,我只是不明白它为什么这样做。

谢谢你。

CSS:

.aHeader 
{

cursor:pointer;
background-color:#00457c; 
border: 1px solid #00457c;
color: White;
font-family: Arial, Helvetica, Sans-Serif; 
font-size:8pt; 
font-weight:bold;
padding:5px; 
margin-top:5px;
text-align:left; 

}

.aContent 
{
background-color:#F5FCFF; 
border:1px solid #00457c;
font-family:Arial, Helvetica, Sans-Serif; 
font-size:.8em; 
font-weight:normal;
border-top:none; 
padding:5px; 
padding-top:10px;

}
.aSelected
{
background-color:#005ca8; 
border: 1px solid #005ca8;
font-family: Arial, Helvetica, Sans-Serif; 
font-size:8pt; 
font-weight:bold;
padding:5px; 
margin-top:5px;
text-align:left; 
}

这是包含移动部件的表格行,第一个 TD 通过垂直对齐固定,第二个 TD 与导航保持不变

<tr>
 <td align="top" style="vertical-align:top;"><asp:Panel runat="server" 
  ID="pnlSelectedCustomer" Visible="false" class="style1" >Selected Customer: 
  <asp:DropDownList runat="server" AppendDataBoundItems="true" ID="ddlSelectedCustomer"
                                onselectedindexchanged="ddlSelectedCustomer_SelectedIndexChanged"
  AutoPostBack="True" EnableViewState="true" DataTextField="CustomerName" DataValueField="CustomerID">
  <asp:ListItem Text="Please Select Customer" Value=""/>
  </asp:DropDownList></asp:Panel></td>
  <td valign="top" rowspan="2" colspan="2" style="border-left:2px solid #000000;">
  <asp:ContentPlaceHolder ID="cphMainWindow" runat="server" OnLoad="cphMainWindow_Load"> </asp:ContentPlaceHolder>
  </td>
  </tr>
  <tr height="90%">                                              
  <td valign="top" style="vertical-align:top;">
   <asp:TreeView ID="tvMainMenu" runat="server" DataSourceID="SiteMapDataSource1" 
                                  ImageSet="Arrows" HoverNodeStyle-ForeColor="Black">
         <ParentNodeStyle Font-Bold="False" ForeColor="Black" />
         <HoverNodeStyle  Font-Underline="True" ForeColor="#5555DD" />
         <SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" HorizontalPadding="0px" VerticalPadding="0px" />
          <NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" HorizontalPadding="5px" NodeSpacing="0px" VerticalPadding="0px" />
           </asp:TreeView><asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
           </td>
           </tr>
4

2 回答 2

1

检查您的表格是如何设置的,听起来您可能有一个放错位置的 td 标签。这就是我的猜测,因为我看不到您遇到问题的所有代码

于 2012-05-25T20:43:43.683 回答
0

为了好玩,对于您的导航列,放一个style="vertical-align:top;"听起来像扩展的第一个窗格大于导航(高度方面)并且由于它们在同一行中,随着第 2 列变大,第 1 列也会变大。但是当另一个窗格已打开,如果它们比第 1 列短,那么一切都会好起来的

于 2012-05-15T19:39:09.993 回答