We are placing a name in a certain space in a webpage, how can we avoid the truncation of some of the name's letters in case the space given wasn't enough to display it all ?
|
closed as off topic by dnbrv, Charles Boyung, Ben Brocka♦ Apr 20 '12 at 23:05
Questions on User Experience Stack Exchange are expected to relate to user experience within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.
|
In this case you have to limit the number of letters on account creation. This could be done in the following way: It's possible to add an event handler in JavaScript to check the number of letters in a text box. If you use the OnKeyUp-event and calculate the length of the entered characters, you could inform the user that the input length is too long and will be truncated. Another way is to disable the submit button if input text is too long, but remember to inform the user why. But if you already have users their display name is present somwhere in the content database, in which there is a maximum length. You are suggested to use a design, where the longest display name fits, possibly on a row above other content to make it fit. Real life example: We had fixed height of a table, and added content to it and where supposed to display a name and a phone number. Below that content there where two buttons for a user to push accepting or rejecting the suggestion. Later on there where much more information added to the name text box, such as a description where to meet. That made the buttons disappear since the height of the table was fixed. This could happen because we didn't match the max length of the database column with the displayed information and the fixed height. We moved away from fixed height, and the buttons could be pushed again. |
||||
|
|
|
Without wanting to sound glib, this is exactly the sort of constraint you should try to avoid as a web designer. Even if you're confident that you'll never be required to add more content, extra fields or iconography, requirements change all the time, and you need your designs to be flexible. Especially if your app could be translated, or your design applied to a slightly different service. However, let's assume you can't redo your design. You've basically got two options:
Number 1 isn't something I'd recommend, because:
Number 2 isn't ideal, but can be ameliorated in certain ways:
Really, though, I'd strongly recommend returning to your original design and trying to make it more flexible. If you've set pixel restrictions on text length, you're going to encounter serious issues when a visually impaired user needs to increase text size, or a branding change suddenly breaks all the place names you'd carefully squeezed into your divs. Save yourself the headaches. |
||||
|
|