How to align Height of the Table

Posted by Naveen7in under CSS 3 on 1/27/2011 | Points: 10 | Views : 1775 | Status : [Member] | Replies : 6
Hi..

How to align height of the table...I have tried with <table width="100%" style="height: 100%" > but its not working.. Even i tried it in Row Tag..<tr style="height: 90%" >...My problem is if that the height of the table is varying with the content of the table..i want the table height to be fixed at any cost...

Thank You in Advance..




Responses

Posted by: Prabhakar on: 1/27/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
hi naveen

u write this way ..

<tr style="width: 528px; height: 240px" >

hope fully it's working ..

Thanks & Regard's
Prabhakar

Best Regard's
Prabhakar

Naveen7in, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naveen7in on: 1/27/2011 [Member] Starter | Points: 25

Up
0
Down
Hi..Prabhakar..

Thanks for u r answer..

If the give the height or width in Pixels..it may change from pc to pc..
i want it in %.



Naveen7in, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 1/27/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi Naveen,

As per the coding standards its always better to give in % (Percent) instead of pixels which is very risky when browsers differ.

Check this link for the BOX model... you will get a better idea

http://www.w3.org/TR/CSS2/box.html

Thanks
Karthik
www.f5Debug.net

Naveen7in, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Questpond on: 1/27/2011 [PanelMember] [Member] [Microsoft_MVP] [MVP] [Administrator] Starter | Points: 25

Up
0
Down
Can you paste your HTML statments here

http://www.questpond.com

Naveen7in, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 1/27/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi naveen


use like this

<tr style="width: 50%; height: 20%" >

If u Satisfied with answer so Click On Mark As Answer

Thanks & Regard's
Prabhakar

Best Regard's
Prabhakar

Naveen7in, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 6/14/2012 [Member] Bronze | Points: 25

Up
0
Down
Please use Pixel insead of Percent

I hope that it will work correctly..

<table width="350px;" style="height: 180px;" >

Naveen7in, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response