S
S
sanns2015-10-22 09:20:01
css
sanns, 2015-10-22 09:20:01

How can I find out the height of a layer with position absolute and move what is under the layer to it?

Hello gentlemen and ladies. Here is an example codepen.io/sanns/pen/MaQwrB . As you can see, under the image input. Above the picture is a menu. I do for Drupal. There will not be an image on all pages. What can you think of so that when there is no picture codepen.io/sanns/pen/bVLdvr , you can still enter a value in input ? Adaptive.
Thank you!
upd can also remove absolute, of course, but how would it be convenient to do this for different Drupal pages?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cat Anton, 2015-10-22
@27cm

codepen.io/27cm/pen/VvQvZK
Wrap the image and menu in a block with a minimum height:

.answer {
  position: relative;
  min-height: 52px;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question