 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

February 4th, 2014, 01:54 PM
|
|
Registered User
|
|
Join Date: Jan 2014
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Text and List Box Widths
How do I get Text and List Boxes to appear on a web page in production, at the widths they are defined in the design stage? I define widths at design time using the Width properties, e.g. 750px, and they appear as they should, at design time, but when I view them when the web site is running, they do not come up at the width specified and I lose most of the line/s, they look as if they are only about 250/300px. I can 'Wrap' the text line/s, and then I can see all the text, but that doesn't help the appearance of the Box. If I right-click the box and select 'Inspect Element', the complete line appears in the Xml, and the Width is shown correctly in there also.
Andy........
|
|

February 4th, 2014, 02:06 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Can you post a URL that shows the behavior?
Could be some CSS that overrides the settings.
Cheers,
Imar
|
|

February 7th, 2014, 07:11 AM
|
|
Registered User
|
|
Join Date: Jan 2014
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Text and List Box Widths
Hi Imar,
I have made very satisfactory progress with my web site, thanks to your info.
However, I still have one outstanding issue for which I canât find the solution. Itâs the issue of a text box not coming up when the web site is running, at the width set during design.
When the site is running, by right clicking the text box and selecting the âInspect Elementâ option, I get the element displayed along with a âStyleâ display, which shows the max-width set to 280px, which is in line with what Iâm seeing on the page, and in line with what you suggested may be the problem in your last reply.
The entry also references Site.css :17, which I assumed to be Line 17 of the file to be found in the Content folder for my web site. When I looked at that file, sure enough, there was this entry. I therefore modified it to read 750px instead of 280px and saved the file, thinking this was my solution.
However, it doesnât appear to have worked. The text box still comes up short on width and the Styles tab still shows the max-width to be 280px. So that leaves me wondering where this information is in fact coming from, what file is this setting in? Iâve checked back to the Site.css file I thought was providing this, and it still has my updated entry.
My web site can be found at AP1945Group.Co.UK, if that is what is meant by the Url, and if that is any use or interest to you.
Regardsâ¦â¦â¦..Andy.
|
|

February 7th, 2014, 08:51 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Andy,
And where on the site is the textbox causing problems?
Imar
|
|

February 8th, 2014, 09:33 AM
|
|
Registered User
|
|
Join Date: Jan 2014
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar, Sorry.............It's on the Panoramas page..............Andy
|
|

February 8th, 2014, 12:23 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
The text box still comes up short on width and the Styles tab still shows the max-width to be 280px
|
I think it all makes sense. In Styles.css you have a rule like this:
Code:
input, select, textarea {
max-width: 280px;
}
which enforces the maximum width of the control to 280px.
When you get rid of this rule, your code should work.
Cheers,
Imar
|
|

February 21st, 2014, 11:33 AM
|
|
Registered User
|
|
Join Date: Jan 2014
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Text and List Box Widths
Hi Imar,
Just a wee note to thank you for your support during my venture into web design.
I have now completed my little project, simple as it was, to it's intended conclusion, and I am very satisfied with the result.
I feel I can now progress to something perhaps a little bit less simple, either new, or based on what I've accomplished so far, with considerably more confidence than I had when I set out on this little venture, thanks to your considerable support and encouragement.
Once again, many thanks.
PS. If you have any reason to here in Central Scotland at some time and have the inclination to do so, maybe I can treat you to lunch somewhere, or at least a cup of coffee......Many Thanks.
Andy.........
|
|

February 21st, 2014, 02:25 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Great! And you're welcome.
No plans to visit Scotland any time soon, but I'll keep it mind. Thanks!
Imar
|
|
 |
|