Last post Dec 19, 2017 09:11 AM by wikioozweb
Dec 08, 2017 12:46 PM|TiredOldCat|LINK
I have created the default web site from the menu of VS2017 using file - new - web site.
On the default.aspx web page, I want to place a text box that will span 100% of the web page. But, the best width I can get is about 25% of the web page in a browser. I have removed
all the code provided within the content tag and have only a textbox. Here is the code. This is the only change from the default web site.
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<asp:TextBox ID="TextBox3" runat="server"
Any suggestions? Thanks for any help.
Dec 11, 2017 08:00 AM|Fei Han - MSFT|LINK
I want to place a text box that will span 100% of the web page. But, the best width I can get is about 25% of the web page in a browser.
You define the width of textbox in percent, you should be aware that the percentage is based on the element's parent, please use F12 developer tools
Dom Explorer to select and check the width of it’s parent element.
I do a test on my side, which works for me.
Dec 15, 2017 12:32 PM|TiredOldCat|LINK
Thanks very much for the help. I have not yet used F12 DOM tools and you have now expanded my tool set so I am on a learning curve again.
Also, using style=width:100% works rather than the older width=100% for a text box is much better.
Have a nice day.
Dec 19, 2017 09:11 AM|wikioozweb|LINK
hank you so moch. i had a problem with this. your advise was so helpful.
please visit my site : wikiooz