Height and padding have no correlation in most cases. The problem with a fixed height was that you were applying it to fix problems rather than sorting out why things werenât as you expected. e.g you had not contained floats and had forgotten about margins increasing the space elements take up.
A wrapper will not need a specific height if you have taken care of the elements inside properly.
Of course things like iframes and images need height but any containers that contain text or fluid content should not be a fixed height. Sometimes it may be appropriate to use height if you need to match something explicitly and when there is no danger of that height causing a problem.
Donât latch on to one concept and think it applies to everything because the methods you use depend heavily on the task on hand.
There is no one size fits all in css which is why some people struggle with it because although some methods may appear to work they may be the wrong methods for the job in hand
Height is fine on that one as you have no fluid content. I believe I told you this in your original thread about height.
In your original thread you were giving a height to the whole column and to a lot of wraps inside that didnât need it. You had something like height 1113px which is a magic number and not needed. You were using a height because you forgot to contain the floats.
In some cases height is appropriate but in others it is a bad approach.
Yes one of those requires a magic number of 64px to put the float at the right of the container and would break should anything be more than a pixel out at anytime (or browsers round up or down).
The float right on the other hand needs no magic number to find its position even if there was a discrepancy in pixel sizes.
Itâs obvious that the float right is a better approach not to mention more succinct.
Table elements are âshrink to fitâ so you donât need a width.
They will be as wide as their content pushes them to be until they reach 100% width.
Overflow :hidden hides the overflow so if you have overflow you want hidden then donât remove it. On the other hand if you have it in place to contain floats then its not needed on display:table elements as they do that automatically.
Overflow:hidden is not needed to contain floats when the parent is display:table because table-cells contain floats without extra mark up (even if you donât have a cell as such because the browser constructs an anonymous table-cell automatically for every display:table element when none exists).