Home All Groups Group Topic Archive Search About

Listbox is overlapping the Textbox in Asp.net

Author
28 Dec 2005 5:13 AM
santel
Hi All,

Is it not possible to overlap the listbox with other controls. I wanna
place the Textbox above the Listbox. I searched many groups but
couldn't get the answer. Any suggestions please.

Author
28 Dec 2005 5:30 AM
Christopher Reed
To put one control on top of another, you will need to use CSS and set the
Position attribute to Absolute for your control. You may also need to use
the Z-Order attribute as well.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

Show quoteHide quote
"santel" <santel_hel***@sify.com> wrote in message
news:1135746812.855811.236930@g49g2000cwa.googlegroups.com...
> Hi All,
>
> Is it not possible to overlap the listbox with other controls. I wanna
> place the Textbox above the Listbox. I searched many groups but
> couldn't get the answer. Any suggestions please.
>
Author
28 Dec 2005 5:52 AM
santel
Thanks for your reply.

I tried all. But the listbox is overlapping the textbox. I want the
Textbox to be displayed on top
Author
28 Dec 2005 6:04 AM
Christopher Reed
Try this:

<asp:TextBox id="txtOne" runat="server"
   style="position:absolute;left:2in;top:2in;width:2in;height:2in;z-index:1"
/>
<asp:ListBox id="lstOne" runat="server"
   style="position:absolute;left:2in;top:2in;width:2in;height:2in;z-index:2"
/>

--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

Show quoteHide quote
"santel" <santel_hel***@sify.com> wrote in message
news:1135749125.537935.109050@f14g2000cwb.googlegroups.com...
> Thanks for your reply.
>
> I tried all. But the listbox is overlapping the textbox. I want the
> Textbox to be displayed on top
Author
28 Dec 2005 7:02 AM
santel
Thanks for your effort.

I tried this. But i can see only listbox. Textbox goes under the
Listbox. But I want is vice versa.
Author
28 Dec 2005 1:48 PM
Christopher Reed
Can you provide some code?
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

Show quoteHide quote
"santel" <santel_hel***@sify.com> wrote in message
news:1135753345.052913.293530@g49g2000cwa.googlegroups.com...
> Thanks for your effort.
>
> I tried this. But i can see only listbox. Textbox goes under the
> Listbox. But I want is vice versa.
>
Author
28 Dec 2005 4:53 PM
addup
Chris: You meant to have the z order of the textbox GREATER than that
of the listbox

Santel: This will work fine in the "modern" browsers (Gekko, KHTML
etc.) but will *NOT* work in IE

It's a well-known problem with IE. Refer to the KB article 177378
http://support.microsoft.com/default.aspx?scid=kb;en-us;177378

my pet hack to fix this is to clide an IFRAME between the listbox and
the textbox

Hope this helps
-- addup --
Author
2 Jan 2006 3:07 PM
santel
Thanx for your replies.