3
I have a div
- position:relative
. And inside that div
I have several divs
- position:absolute
.
Thus the height
of div
parent does not work automatically.
I want the height
automatically adjust to the positioning of the absolute elements. I’m imagining that you can’t do it yourself.
I have to determine a height
fixed ? There is some fix to solve this ?
I’m wearing LESS, guys. LESS!
.mockup{
padding-bottom: 70px;
display: block;
position: relative;
overflow: auto;
height: 270px;
img{
position: absolute;
top: 0;
left: 0;
}
}
That one
img{
inside.mockup{
Does it work? Or did you mispost here?– Paulo
Are you using LESS or SASS? If you are, please mention this in the question. Otherwise, see @Orion’s comment.
– mgibsonbr
What do you mean
o height da div pai não funciona automaticamente
? You want the image to be the height of the.mockup
?– Oeslei
I’m using LESS.
– Diego Souza
@Oeslei, I want the height of
div
parent fits while moving the absolute elements. I give atop:100px
I want theheight
stay100px
.– Diego Souza
I have the same problem, but I’ve seen that only with css will not happen even no face... If you can solve until I’m wondering and your get the answer I come here to put.... Anyway the best way is using JS even... Few lines solve...
– Luizinho Timão