Wrox Programmer Forums
|
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
 
Old February 4th, 2014, 01:54 PM
Registered User
 
Join Date: Jan 2014
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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........
 
Old February 4th, 2014, 02:06 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Can you post a URL that shows the behavior?

Could be some CSS that overrides the settings.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old February 7th, 2014, 07:11 AM
Registered User
 
Join Date: Jan 2014
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
 
Old February 7th, 2014, 08:51 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Andy,

And where on the site is the textbox causing problems?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old February 8th, 2014, 09:33 AM
Registered User
 
Join Date: Jan 2014
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar, Sorry.............It's on the Panoramas page..............Andy
 
Old February 8th, 2014, 12:23 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old February 21st, 2014, 11:33 AM
Registered User
 
Join Date: Jan 2014
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.........
 
Old February 21st, 2014, 02:25 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Great! And you're welcome.

No plans to visit Scotland any time soon, but I'll keep it mind. Thanks!

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Grab Values From List Box into Text Box phungleon VB How-To 2 June 19th, 2008 10:33 PM
multi-column list box values moved to 2nd list box sbmvr Access VBA 1 May 14th, 2007 01:58 PM
List Box Text problem balesh ASP.NET 1.0 and 1.1 Professional 1 August 31st, 2006 07:05 AM
List/Menu Box Options From a Text File phungleon Classic ASP Professional 4 April 23rd, 2004 11:49 AM
Search using drop down list box and a text box tcasp Classic ASP Basics 1 July 31st, 2003 02:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.