Reputation: 19
On a page some script is running and is accidently controlling the height of an inline style.
Not sure what script is modifying the height property.
<div class="vgca-iframe-wrapper wpfa-initialized" style="height: 6424px;">
The height keeps going up and pushing all elements past the footer.
Trying to lock this class from being edited.
So far tried controlling the element in the css stylesheet to keep it locked at 3000px..
div.vgca-iframe-wrapper.wpfa-initialized {
height: 3000px !important;
}
to no avail.. any help appreciated. Open to ideas how to prevent this css style element from being changed.
Upvotes: 1
Views: 65
Reputation: 4170
max-height
The CSS property max-height will give the height an upper limit, even if height
is higher. See snippet below:
div {
background-color: #a0a;
}
div.vgca-iframe-wrapper.wpfa-initialized {
height: 20px !important;
max-height: 20px;
height: not-allowed !important;
}
<div class="vgca-iframe-wrapper wpfa-initialized" style="height: 80px;">
Used 20px for your height and 80px for the height in the style attribute. As you can see the div stays and 20px height.
We don't even have to make max-height !important.
Upvotes: 1