• 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

HTML table uniform row size..

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a question on HTML tables..
I want my table rows to be of uniform width and height.
Because when the size of the cell values vary, they ajust and it affects the uniformity.
How do I make the cell values to be of constant height and width, unmindful of the cell value size?
Any style attrbutes for this?
I tried max-height & max-width.. Couldn't get it to work..
Please help..
 
Steve Renard
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One more I missed.
I also don't mind if the text in cells are partly cut off..
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might try setting a fixed size and use overflow: hidden.
 
Steve Renard
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Should I use in the <tr> tag or <td> tag for each cell?
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Steve,

Please look at http://www.w3.org/TR/CSS21/tables.html#fixed-table-layout


 
Steve Renard
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.
The width portion of the problem is taken care of now..
But I have the row height auto adjusted for a large cell value..
So I still don't get the overall uniformity across the table.
Suggestions please..
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It says at http://justaddwater.dk/2006/03/11/how-to-limit-table-cell-height-gmail-style/ that the following works -



A similar post to yours at http://www.stylusstudio.com/xsllist/200403/post10320.html#
 
Steve Renard
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cool...
That worked..
Thanks a lot!!!
 
Steve Renard
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oops!!!
The table-layout: fixed; attribute allocates the table width equally to all the columns.
But I have some columns which are wider than the others.
Here there are unwanted spaces for a short cell text and clipped part for a wide cell text.
So the non-uniformity problem is back again on the width part.
Please help..
 
Steve Renard
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In other words, I want to allocate cell width individually for each cell.
Looking forward to your help..
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Steve,

Please use the width attribute for individual cells as you see in my post from July 26.

Cheers,
Dan
 
I child proofed my house but they still get in. Distract them with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic