Solved

Keeping an AJAX dropdownextender on top of all DIV

Posted on 2014-10-28
5
206 Views
Last Modified: 2014-10-29
I have a dropdownextender/listbox that I'm using. Because of it's placement on my page, it falls behind other DIVs.
Is there a way to force the extender to always appear on top when it is activated?

 
(<asp:Label ID="lblCustomer" runat="server" Text="Label"></asp:Label>)
    <cc1:DropDownExtender ID="ddeCustomer" DropDownControlID="ListBox1"
        runat="server" DynamicServicePath="" Enabled="True" TargetControlID="lblCustomer"
        HighlightBackColor="WhiteSmoke">
    </cc1:DropDownExtender>


    <asp:ListBox ID="ListBox1" runat="server" AutoPostBack="True">
</asp:ListBox>

Open in new window

0
Comment
Question by:mwmiller78
  • 3
  • 2
5 Comments
 
LVL 17

Accepted Solution

by:
selvol earned 500 total points
ID: 40409791
Try this
Adding this to the page head,,,
</style>
#ListBox1:hover{z-index:999}
<style>

Open in new window



The z-index specifies the level of an object.

i.e.  2 would cover or be above 1 and so on 999 is just to be safe.


Selvol
0
 

Author Comment

by:mwmiller78
ID: 40409986
I assume you mean

<style>
#ListBox1:hover{z-index:999}
</style>

Open in new window


(your tags were reversed)

Which does not work
0
 

Author Comment

by:mwmiller78
ID: 40409987
FYI...it's a dropdownextender so I have to click a control...no hover. Not sure if that's relevant to your proposed solution or not.
0
 

Author Comment

by:mwmiller78
ID: 40409994
ok I added this to my CSS

.alwaysontop
{
z-index:10;
}

Open in new window


then changed my list box to

 <asp:ListBox ID="ListBox1" runat="server" AutoPostBack="True" CssClass="alwaysontop">
</asp:ListBox>

Open in new window


Worked like a charm. Thanks!
0
 
LVL 17

Expert Comment

by:selvol
ID: 40411723
Yes, thank you for correcting that fatal mistake I made.

Glad to help..

Way to take the idea and run with it.
It's always a better feeling helping someone that takes a little bit
of info and learns from it. Then fixes the problem there way.

Thank you
Selvol
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now