Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying TextBox over a Div Element

Status
Not open for further replies.

Maddy20

Programmer
Sep 16, 2008
2
US
Hi.

I want to display a textbox over a div element. I have a tabcontainer in which there are several textboxes along with the div elements. right now I am using 'position:absolute' to display the textbox over the div, but as the tab container has a fixed height along with the verticla scroll bar to scroll down, the textboxes are been displayed over the tab container. Is there any way to display textbox over the div element and still displayed inside the tab container??



If I use absolute positioning and left,top position the textboxes are shown over the tab container.

I am providing part of my code hope it will be usefull.

<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div id="service" style="BEHAVIOR:url(webservice.htc)" ></div>
<div>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Height="200px" Width="780px" ScrollBars="Vertical">
<cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="TabPanel1">
<ContentTemplate>
<table>
<tr >
<td style="width: 100px;height: 189px;">

<div class="markupbox_CSS" style="width: 399px; height: 189px;"/>
<textarea id="TextBox1" runat="server" style="width: 399px; height: 189px;" class = "textArea_CSS" ></textarea>

</td>
</tr>
<tr >
<td style="width: 100px;height: 189px; ">

<div class="markupbox_CSS" style="width: 399px; height: 169px;"/>

<textarea id="TextBox2" runat="server" style="width: 399px; height: 169px;" class="textArea_CSS" ></textarea>
</td>
</tr>
</table>
</ContentTemplate>
</cc1:TabPanel>
</cc1:TabContainer>
</ContentTemplate>
</asp:UpdatePanel>

</div>

</form>



CSS Code:

.textArea_CSS{
border: 0px;
position: absolute;
background: transparent;
color: windowtext;
font: menu;
line-height: expression('1.5em');
padding: 1px;

}

.markupbox_CSS {
position: absolute;
overflow: hidden;
font: menu;
line-height: expression('1.5em');
padding: 3px 1px 1px 1px;
background: window;
color: window;
white-space: pre;

}


Thanks a lot..



Maddy
 
What exactly are you trying to do? Whatever it is, there is a better and simpler way to do it.

Also, you posted .NET code, which consists of proprietary Microsoft tags that are later rendered to real HTML tags. We would be able to assist you better if you posted the rendered code (you can obtain that by doing view source on the actual page).

Finally, your CSS and HTML are littered with strange attributes and values. Are these values more Microsoft in-between things that are eventually rendered as valid CSS and HTML or are they just made up values?

___________________________________________________________
[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top