Page view counter

DIV Over DropDownList (Solution)

Last post 03-26-2009 8:40 AM by arry.net. 5 replies.

Sort Posts:

  • Idea [Idea] DIV Over DropDownList (Solution)

    10-07-2005, 5:21 PM
    • Loading...
    • Dave Ruhl
    • Joined on 12-13-2004, 4:14 PM
    • Posts 273
    • Points 1,337
    I have a page with several dropdownlist controls.  I also have a <div> that is designed to simulate a popup window (title bar and close button images and an iframe).  When I make the div visible it doesn't quite cover everything that is supposed to be beneath it.  It seems to cover other divs, labels, checkboxes, and textboxes completely.  But dropdownlists show through the border and title bar/close button images of my 'popup' div.  Only the iframe successfully covers the dropdown controls (but the dropdown shows through the iframe border).

    I've tried various z-index setting for all controls involved, but nothing seems to work.  I've also tried using an <asp:panel> instead of the div, and I've tried putting the 'popup' div in a user-control. 

    Is this a bug, or is there a way to hide a dropdownlist control behind a <div> ?

    All controls are runat=server and positioned either absolute or relative.  I'm using VWD Express Beta 2 (.NET 2.0)

    Thanks...

    Dave
  • Re: DropDownList - Z-Index BUG ?

    10-10-2005, 4:00 PM
    • Loading...
    • Darmark
    • Joined on 09-11-2003, 3:09 PM
    • Long Island, NY
    • Posts 678
    • Points 3,681
    Darmark

    Mark as Answer, if this reply answers your post.
  • Re: DropDownList - Z-Index BUG ?

    10-10-2005, 4:41 PM
    • Loading...
    • jamesqua
    • Joined on 08-03-2004, 6:55 PM
    • Columbus, OH
    • Posts 1,362
    • Points 7,869
    You may also want to try putting the drop down list within a div and set the z-index of the div
  • Re: DropDownList - Z-Index BUG ?

    10-11-2005, 2:47 PM
    • Loading...
    • Dave Ruhl
    • Joined on 12-13-2004, 4:14 PM
    • Posts 273
    • Points 1,337
    Thanks for the suggestion Jamesqua, but I was not able to get it to work using <div> z-indexing.

    However, the link that Darmark suggested was very helpful, and I was able to use their work-around solution to solve my problem.  Since dropdownlists and listboxes are based on Windows form controls, they behave differently than other web controls.  By using a second iframe (see below, id="CoverControls", no src=) I was able to cover the dropdownlists and then place my controls over this src-less iframe.  The src for 'frameExcel' is set in the VB code.

    Thanks again for the suggestions !

    Dave


    <div id="ExportWindow" style="position:absolute; top:170; left:300; width:424" runat="server">

    <div id="Div5" style="position:absolute; top:0; left:0; width:100%" runat="server">

    <iframe id="CoverControls" height="253" width="100%" style="position:absolute; top:0; left:0; border-style:none" frameborder="no" runat="server"/>

    <div id="Div1" style="position:absolute; top:2; left:0; width:100%" runat="server">

    <iframe id="frameExcel" height="245" width="100%" style="position:absolute; top:0; left:0; border-style:ridge; border-width:2" frameborder="no" runat="server"/>

    </div>

    <div id="Div2" style="position:absolute; top:0; left:0; width:100%; overflow:hidden" runat="server">

    <asp:Image ID="imgBar" ImageUrl="~/Images/BlueBar.jpg" runat="server" />

    </div>

    <div id="Div3" style="position:absolute; top:2; left:400" runat="server">

    <asp:ImageButton ID="imgClose" ImageUrl="~/Images/BtnClose.jpg" style="cursor:hand" ToolTip="Close Window" runat="server" />

    </div>

    <div id="Div4" style="position:absolute; top:2; left:10" runat="server">

    <asp:Label ID="lblTitle" Text="Export to Microsoft Excel" ForeColor="white" Font-Names="Arial" Font-Size="Smaller" Font-Bold="true" runat="server"/>

    </div>

    </div>

    </div>

  • Re: DIV Over DropDownList (Solution)

    01-13-2008, 12:49 PM
    • Loading...
    • dsalko
    • Joined on 12-25-2007, 9:12 PM
    • Posts 13
    • Points 49

    This is because dropdown list is windowed element in IE...

    "In IE6, the HTML <SELECT> element was implemented through the Windows Shell ListBox and Combobox controls. Some key features were missing in the old version of the SELECT element, such as proper support for z-index, TITLE support, and zoom. Web developers had to write complex CSS and scripts to workaround these issues." - from here http://blogs.msdn.com/ie/archive/2006/01/17/514076.aspx

    One of the solutions - to use some custom control instead of DropDownList, for example this one Sakura DropDown . Or this one from CodeProject 


     Also, Telerik suggest cool controls and dropdown too.

     

  • Re: DropDownList - Z-Index BUG ?

    03-26-2009, 8:40 AM
    • Loading...
    • arry.net
    • Joined on 07-04-2008, 5:42 AM
    • Posts 34
    • Points 80

     thankss a lot ,it really helped me alot

    arry.net
Page 1 of 1 (6 items)