0
I have a figure and in its interior a form, the big problem is that when I resize the browser the figure is readjusted perfectly, however the form that is inside it comes out of the object.
The image below shows your is normal, with the browser maximized.
OBS: The figure displays the photo and the form is the black rectangle
When readjusting the browser the form leaves the centralized space of figure, as shown below.
I need the form be always centered in the middle of the figure.
HTML
<figure class="cx-fotos-portugal">
<form>
</form>
<img src="./fotos-portugal/foto-portugal-capitania-do-porto-cascais.jpg">
</figure>
CSS
figure.cx-fotos-portugal img{
width: 100%;
height: 100%;
max-height: 550px;
}
figure.cx-fotos-portugal form{
position: absolute;
width: 35.71428571428571%;
height: 14.28571428571429%;
max-height: 550px;
background-color: #000;
left: 35%;
top: 30%;
}


post the code you’ve already done, so we can find the error and fix it
– Felipe Duarte
@Felipeduarte put the code
– Gladison