Jump to content

Rulingace

Neophyte
  • Posts

    1
  • Joined

  • Last visited

Rulingace's Achievements

Explorer

Explorer (1/14)

0

Reputation

  1. Есть такой код: <div class="parrent" style="position:relative"> <div class="child" style="width: 100%; position:absolute" ><img style="max-width:100%"></div> </div> Как вы видите, дочерний блок содержит в себе резиновое изображение и в зависимости от размера окна будет менять свою высоту, но при этом parrent будет оставлять свою высоту неизменной, т. к. дочерний имеет position: absolute. Как с помощью css/js заставить parrent принять высоту child?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy