I have a div whose child p tag contains text.
I want the p
tag to only be 70%
in height.
This works, it is only 70%
of the parent's height. I then use "overflow: hidden;
" on the p tag to hide the extra content.
Then I thought I could just add 15% margin-top
or add 15% padding-top
(to the parent) to vertically center the p tag in the parent div... but I find I need to set it to something like 3%
.... how come?