在Firefox / Chrome的阿贾克斯手风琴问题 [英] Ajax Accordion issues in firefox/chrome

查看:75
本文介绍了在Firefox / Chrome的阿贾克斯手风琴问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2窗格中的手风琴。问题是,如果我将它设置为自动调整大小=限制和的selectedIndex =0,当负载在第一时间,在IE 9中,工作完全正常,但在Firefox /铬,内容窗格的大小比小内容。但是,如果我关闭和打开背面的面板,它会正常工作。

I have an accordion with 2 pane. The thing is if I set it to autosize="Limit" and selectedindex="0", when load the first time, in IE 9, it works perfectly fine but in firefox/chrome, the size of the content pane is smaller than the content. But if I close and open back the pane, it will work fine.

如果我将它设置为的SelectedIndex = - 1,在IE9它会正常工作,所有的窗格中就会崩溃,然而,在镀铬/ Firefox中,它完全打开第一个窗格

If I set it to selectedindex="-1", in IE9 it will work fine where all the pane will collapse, however in chrome/firefox, It fully open the first pane.

我怎样才能使它在所有的浏览器完全打开。我试着设置autoSize =填充,但结果是一样的上面。

How can I make it to fully open in all browser. I've tried to set the autosize="Fill", but the result is same as the above.

下面是code

<ajaxToolkit:Accordion id="Accordion" runat="server" Height="100%" Width="100%" HeaderCssClass="accordionHeader" HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent" AutoSize="Fill" RequireOpenedPane="true">
                        <Panes>
                            <ajaxToolkit:AccordionPane ID="accordionPaneReport" runat="server">
                                <Header>Reports</Header>
                                <Content>

//some treeview content
</Content>
 </ajaxToolkit:AccordionPane>
                            <ajaxToolkit:AccordionPane ID="accordionPanePcGroup" runat="server" Visible="false">
                                <Header>PC Groups</Header>
                                <Content>

//some treeview content
</Content>
 </ajaxToolkit:AccordionPane>
                        </Panes>
                    </ajaxToolkit:Accordion>

更新:
我试着用萤火虫来调试。如果我把填充底部一定的参考价值手风琴内容的CSS,它将使内容窗格中的时间比真正的内容本身,但它不是一个真正的解决,我想..

Update: I tried to debug using firebug. If I put padding-bottom some value to the accordion content css, it will make the content pane longer than the real content itself but it's not a real fix, i guess..

推荐答案

我已经找到了我自己的问题的解决方案。

I already found a solution for my own question.

这行为是那样由于手风琴CSS得到了它的div容器CSS之前运行。所以,当第一次加载,手风琴认为格空间是不够的,因此,面板出现小于它应该。

It behave that way due to the accordion css got run before its div container css. So when first load, the accordion thought the div space was not enough, hence, the pane appear smaller than what it should.

我所做的就是移动DIV + CSS手风琴CSS的顶部,其中div的高度为100%。

What I did was to move the div css on top of the accordion css where the height of the div is 100%.

在IE浏览器,好像它读取整个事情不是只加载它。但在其他浏览器中,好像它根据其顺序由一个加载的东西之一。这就是为什么它在IE工作的罚款而已。

In IE, seems like it read the whole thing than only load it. But in other browser, seems like it loads the stuff one by one according to its order. Thats why it was working fine in IE only.

抱歉,我必须勾选此作为回答。

sorry I have to tick this as the answer..

这篇关于在Firefox / Chrome的阿贾克斯手风琴问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆