Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clipping table data

Status
Not open for further replies.

BlueMango

Programmer
Jun 22, 2002
34
CA
I'm working on an xslt project which outputs data of indeterminate length into a table. The problem is, for aesthetic purposes, every table row must only be one line high, and must not extend past the side edges of the viewport (no horizontal scroll bars!!).
I've tried using 'nowrap' and setting the width, but the nowrap seems to take precedence and the tables bloat. I've tried setting clipping sizes using CSS, but I can't seem to make it work (it seems current browsers don't support clipping of table cells...).
I could use xslt to truncate the strings before I output them to HTML, but I'm leaving this as a last resort since this doesn't allow the table to be scalable with different users screen sizes (ie. I want them to be able to see as much of the information as possible).

Any suggestions of what I could do instead??
 
you've tried using overflow:hidden in the style for the row?
 
Sorry i took so long to reply on this... I've been busy.

Yes, I've tried setting overflow on the rows, and just about everywhere else I can think of.. nothing works.

Any other suggestions??
Are there perchance any proprietary (ie. MS only) CSS attributes or something that I don't know about that would be able to do the job? I'm only familiar with the w3c standards. "Insofar as the propositions of mathematics refer to reality they are not certain, and insofar as they are certain they do not refer to reality." -- Albert Einstein
 
may be used a fixed width font and use javascript to trim the length of strings that are too long
 
Can javascript find the pixel width of a user's monitor? It would need this functionality if I were to go this route, as the whole issue is being cross-platform compliant. "Insofar as the propositions of mathematics refer to reality they are not certain, and insofar as they are certain they do not refer to reality." -- Albert Einstein
 
Yes it can. Do this

var width=screen.width;
var height=screen.height;

Rick If I have helped you just click the first link below to let me know :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top