467,163 Members | 966 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,163 developers. It's quick & easy.

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:20px"></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
Jan 5 '08 #1
  • viewed: 6292
Share:
4 Replies
shane3341436
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:20px"></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:
Expand|Select|Wrap|Line Numbers
  1. TR {
  2. height:20px;
  3. }
  4.  
Jan 5 '08 #2
100+
Yes you can do this by writing something in your stylesheet like:
Expand|Select|Wrap|Line Numbers
  1. TR {
  2. height:20px;
  3. }
  4.  
If the data present in a cell is large then the row size of that particular row increases.

How to fix this ?
Jan 9 '08 #3
shane3341436
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.
Jan 9 '08 #4
100+
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.
Jan 9 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by xo55ox | last post: by
1 post views Thread by Hima Bindu | last post: by
1 post views Thread by Olav Tollefsen | last post: by
2 posts views Thread by Udi | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.