Textbox width scaling to width of data not width of page?

A

AndrewF

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
 
B

Bruce Barker

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top