Problem with div with 100% height and padding inside a td with 100% height?

Set the padding using percents rather than pixels. So give it a 5% padding for the top and bottom, then set the height to 90%.

Set the padding using percents rather than pixels. So give it a 5% padding for the top and bottom, then set the height to 90%. jsfiddle.net/yjjRW/2.

%ge is calculated on width..so this will still cause the inner div to flow outside – Jags Sep 21 at 13:47 @JamesSmith That's new to me, thanks for telling me that. – Ariel Sep 21 at 20:13.

CSS3 add to a DIV box-sizing: border-box; -moz-box-sizing: border-box; Other approach would be use of positioning. Td { position: relative; } div { position: absolute; top: 5px; .... } Or you can use JS solution which is a bit awkward. After page loads, check offsetHeight of each TD and set it to the its firstChild (nested DIV).

Cant use css3..it needs to support old browsers! And just tried the other one in jsfiddle..does not work – Jags Sep 21 at 11:04 So lets wrap inner DIV in another one jsfiddle. Net/yjjRW/7 – Jan Pfeifer Sep 21 at 11:24 when I integrate your code into my site's page..for some weird reason..the height of my inner-div is getting calculated as 0!

– Jags Sep 21 at 14:08 I checked in firebug as well..no other style is getting applied to either parent (td) or inner content...only the ones which I took from your example are there – Jags Sep 21 at 14:59 ok..so I investigated further..the table in which td is contained is not set to 100% height..and my limitation is that I cant touch any code outside the td! – Jags Sep 21 at 15:50.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions