Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Textbox width scaling to width of data not width of page? (http://www.velocityreviews.com/forums/t111314-textbox-width-scaling-to-width-of-data-not-width-of-page.html)

AndrewF 10-10-2005 11:31 AM

Textbox width scaling to width of data not width of page?
 
Hi there,

I have racked my brains for days on this and can't seem to find a
solution.

I have a form which is dynamically creating some text boxes on it. The
text boxes are single line ones.

At the moment I am creating them and not specifying either width or
column size, preferring to use CSS to style them so the designers can
do it rather than digging through code.

So we have set the fields to be 80% of the page width and it works
absolutely fine when the text in the text fields are empty or less than
80% of the page width.

What happens when the text is longer than that though is that the page
is created to be the width of the text that would be in the text field
if it were all on one line and then the text field is scaled back to
80% of that.

So on particularly long entries it could double the screen width.
Generally it would be a case of putting in a text box which is
multiline but by and large it isn't necessary other than on a few odd
entries where they are entering more text.

Does anyone have any idea why this is happening?

Cheers
AndrewF


Bruce Barker 10-10-2005 04:38 PM

Re: Textbox width scaling to width of data not width of page?
 
you have to specify a page width, so that the 80% is a percent of something.
currently the page is calc'ing the text width to get the page width, then
scaling the textbox to 80% of that.

-- bruce (sqlwork.com)


"AndrewF" <andrew@transitionkiteboarding.com> wrote in message
news:1128943883.008562.130570@g43g2000cwa.googlegr oups.com...
> Hi there,
>
> I have racked my brains for days on this and can't seem to find a
> solution.
>
> I have a form which is dynamically creating some text boxes on it. The
> text boxes are single line ones.
>
> At the moment I am creating them and not specifying either width or
> column size, preferring to use CSS to style them so the designers can
> do it rather than digging through code.
>
> So we have set the fields to be 80% of the page width and it works
> absolutely fine when the text in the text fields are empty or less than
> 80% of the page width.
>
> What happens when the text is longer than that though is that the page
> is created to be the width of the text that would be in the text field
> if it were all on one line and then the text field is scaled back to
> 80% of that.
>
> So on particularly long entries it could double the screen width.
> Generally it would be a case of putting in a text box which is
> multiline but by and large it isn't necessary other than on a few odd
> entries where they are entering more text.
>
> Does anyone have any idea why this is happening?
>
> Cheers
> AndrewF
>





All times are GMT. The time now is 02:00 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.