0

Hi,
How can I position one elemenent on top of another within a table cell? I need the <TextBox> element positioned on top of the <input> element. The second element, the <TextBox>, is currently displaying below the <input> element. I tried using the left, top, display, and position style attributes with no luck. Below is the code.

Thanks,
Mike

<tr>
<td align="left" style="width:765px;">
<input id="txtArtwork" style="Z-INDEX: 149; WIDTH: 724px; HEIGHT: 22px;" tabindex="17" type="file" src="//localhost/ArtworkAttachments" size="101" name="MyFile" runat="Server">
<asp:TextBox id="txtSelectedFile" style="Z-INDEX: 149;" runat="server" Width="642px" tabIndex="18"></asp:TextBox>
</td>
</tr>

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by mikefitz
0

Try something like this:

<style>
    		.wrapper {
    			position:relative;
    		}
			
			#txtSelectedFile {
				position:absolute;
				top:0;
				left:0;
				z-index:150;
			}
    	</style>
		
        <div class="wrapper">
            <input id="txtArtwork" style="Z-INDEX: 149; WIDTH: 724px; HEIGHT: 22px;" tabindex="17" type="file" src="//localhost/ArtworkAttachments" size="101" name="MyFile" runat="Server">
            <asp:TextBox id="txtSelectedFile" style="Z-INDEX: 149;" runat="server" Width="642px" tabIndex="18"></asp:TextBox>
        </div>

Should do the trick

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.