CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Just one line, no wrap

Print topic Send  topic

Author Message
Eric
Posted: 04/11/2005, 6:16 PM

When displaying data in a CSS grid,

Is there an easy way to limit the contents of a column to one line even if the value is longer that the space available in the column?

The "nowrap" attribute should prevent wrapping but does not always appear to work. Also it can make cells very wide.

I can see one method to limit the data is to clip the text string to a maximum width but a CRLF sequence (carriage return / line feed) in the string appears to still display two lines. One could search for CRLF but I wonder if there is an easier way to limit the text in the columns so the columns are always a fixed size.

TIA
Nicole

Posts: 586
Posted: 04/12/2005, 2:58 AM

Eric,
You can cut long text value displayed in a Label in its Before Show event and output fixed length string (e.g. first 50 characters). In this case apply PHP strung functions to field’s value to cut it
http://www.php.net/manual/en/ref.strings.php
In addition to it you can set fixed width to a table cell via HTML styles, e.g.
<td class="CaravanDataTD" style="WIDTH: 50px">{LabelField} </td>

_________________
Regards,
Nicole
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.