Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

set a universal size for the cells in a table

 
Brendan Kennedy
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the same issue. Does anyone have a solution/get-around?

Thanks.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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

Eric
 
James Lee
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can look into the css word-wrap

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic