How to set(fix) the rows height in a table in HTML

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • royal ludhiana
    New Member
    • Jan 2008
    • 11

    How to set(fix) the rows height in a table in HTML

    hi all,

    How can I set(fix) the row height in a table. i.e. I have 10 rows in a table and I want to fix the height of all the rows to "20px".

    - One way to do this is that I write....... <tr style="height:2 0px"></tr> ......in all the rows.

    But I want to know is there anyway by which I can write this at a single place and all the rows are aligned automatically.

    Regards,

    Royal
  • shane3341436
    New Member
    • Mar 2007
    • 63

    #2
    Originally posted by royal ludhiana
    hi all,

    How can I set(fix) the row height in a table. i.e. I have 10 rows in a table and I want to fix the height of all the rows to "20px".

    - One way to do this is that I write....... <tr style="height:2 0px"></tr> ......in all the rows.

    But I want to know is there anyway by which I can write this at a single place and all the rows are aligned automatically.

    Regards,

    Royal
    Yes you can do this by writing something in your stylesheet like:
    Code:
    TR {
    height:20px;
    }

    Comment

    • pankajit09
      Contributor
      • Dec 2006
      • 296

      #3
      Originally posted by shane3341436
      Yes you can do this by writing something in your stylesheet like:
      Code:
      TR {
      height:20px;
      }
      If the data present in a cell is large then the row size of that particular row increases.

      How to fix this ?

      Comment

      • shane3341436
        New Member
        • Mar 2007
        • 63

        #4
        Originally posted by pankajit09
        If the data present in a cell is large then the row size of that particular row increases.

        How to fix this ?
        If you have large data, why do you want to fix the height of each data row to 20 px? If you have variable sizes of data it is better to categorize the rows into different classes in stylesheet. If the data is too large you may not specify the size of the row.

        Comment

        • pankajit09
          Contributor
          • Dec 2006
          • 296

          #5
          Originally posted by shane3341436
          If you have large data, why do you want to fix the height of each data row to 20 px? If you have variable sizes of data it is better to categorize the rows into different classes in stylesheet. If the data is too large you may not specify the size of the row.
          All the data is not large.

          Comment

          Working...