1

I am writing code in ASP.NET.

I have a button that is clickable on IE but not on FF nor Google Chrome.

I've discovered that the reason lays on the fact that its position: absoulute OR position:fixed Here's the code:

<div style="padding-top:50px";>
            <div id="divInfoBox" runat="server" style="padding-top:5px; height:250px;"> 
                <div style="position:fixed; padding-left:-5px; ">
                    <asp:ImageButton CssClass="attachmentImageButton" ID="btnAttachment" runat="server" Visible="false"
                        ImageUrl="~/Style/images/attachment.png" onclick="btnAttachment_Click" />
                </div>                    
            </div>
        </div>

How to make it be clickable on all browsers?

4

1 回答 1

1

My guess is that the first two div elements are on top of the ImageButton and therefore it is not clickable. I have no clue why is that (be glad to find out the exact reason). All I know is that the solution is adding the following:

z-index:5

And that should do the trick.

Good luck

p.s.: if 5 isn't enough, try adding higher value.

于 2013-01-08T11:42:35.927 回答