By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,739 Members | 1,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,739 IT Pros & Developers. It's quick & easy.

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

P: 11
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
Share this Question
Share on Google+
4 Replies


shane3341436
P: 63
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+
P: 296
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
P: 63
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+
P: 296
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.