Constant table cell height and width?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Krshna
    New Member
    • Jun 2007
    • 1

    Constant table cell height and width?

    I have a HTML table where I display records from database.
    Here's an example cell value:
    <td align="left" style="width:11 %;height:1%;fon t-weight:bold;fon t-family:Arial; font-size:80%;" ><c:out value='${gm.COM M}'/></td>
    Currently the cell width and height are auto adjusted according to the cell values.
    However, I want them to stay constant for the table to appear consistent.
    Despite adding height and width attributes to it, it still auto-adjusts.
    Are there any other style attributes to do this? Please help..
  • JavaBugger
    New Member
    • Jul 2007
    • 8

    #2
    Your height and width are in Percents....

    If you want a constant height and width, you must change that to pixels, instead of percent of screen. Also, you put the width and height attributes in to the Style section....

    Try this...(my changes are in bold)

    <td align="left" width="100" height="5" style="font-weight:bold;fon t-family:Arial; font-size:80%;" ><c:out value='${gm.COM M}'/></td>

    The width and height are in pixels....mess around with those as much as you want until you get the perfect size...

    Comment

    • nitinpatel1117
      New Member
      • Jun 2007
      • 111

      #3
      Use pixels for the height and width, but, put it back in the style bit.

      Comment

      Working...