How to make the height of the parent block in percent (Actually, I need padding-bottom in%)

Here is what I want to do, but only the height is not fixed, but as a percentage of the Demo


UPD

I decided in general my problem, giving the main unit an absolute position and wrapping it in another div, which sets the dimensions demo

  • Clarify the question. The height of which element. Add code. The essence of the problem is not at all clear - Yuri
  • @yuri modal_news_wrapper for this element height is needed in% - Herrgott
  • @Herrgott, .modal_news_wrapper { width: 60%; height: 60%; padding-bottom: 40%; } .modal_news_wrapper { width: 60%; height: 60%; padding-bottom: 40%; } .modal_news_wrapper { width: 60%; height: 60%; padding-bottom: 40%; } - HamSter
  • @elena so does not work - Herrgott
  • @Herrgott, so that would work, you need to enclose it in a block that has a fixed height. Then the percentage will work - Yuri

0