aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes set a universal size for the cells in a table Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "set a universal size for the cells in a table" Watch "set a universal size for the cells in a table" New topic
Author

set a universal size for the cells in a table

Brendan Kennedy
Ranch Hand

Joined: May 02, 2001
Posts: 65
Does anyone know how to do this??
td {width: 200px}
in my style sheet doesn't work..
I also tried for just one cell <td width=200> but this didn't do anything!
everyone on the web seem to think that that's the solution but it's not.
It would be better if I can set the size in the <table> tag or the <td> tag cos I dynamically draw the table headers separately in a div and I
can't have the css being applied to them each time they're drawn.
It is ok if the cells are large because I hope to make them all the same size as the largest cell(the size of which is known)
Any ideas?
Thanks,
Brendan
James Lee
Ranch Hand

Joined: Oct 16, 2006
Posts: 36
I have the same issue. Does anyone have a solution/get-around?

Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6


That works for me, not sure what is the problem.

Eric
James Lee
Ranch Hand

Joined: Oct 16, 2006
Posts: 36
Thanks, Eric.

The issue is when the length of a cell content is more than 200 px in your code, that column will be changed wider. In other words, is there a way to make cell contents get wrapped automatically if they are two long so that the column's width stays fixed instead of getting bigger?

Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
You can look into the css word-wrap

Eric
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: set a universal size for the cells in a table
 
Similar Threads
How to reduce cell heigt in a Table
width of HTML table cell
set a universal size for the cells in a table
Another table border question
Constant table cell height and width?