• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

set a universal size for the cells in a table

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the same issue. Does anyone have a solution/get-around?

Thanks.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can look into the css word-wrap

Eric
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic