I am developing a responsive form, in which the section where the logo is located I have to hide it when viewed by a mobile. My problem is that the media-query is not working as expected, and I do not understand why. At the desktop it works very well.
The HTML looks like this:
<section class="form_wrap">
<section class="cantact_info">
<section class="info_title">
<div class="text-center">
<img src="images/logo1.png" class="img-fluid" alt="logo" width="110" height="112">
</div>
<h2>Form</h2>
</section>
<form action="" class="form_contact">
<h2>Ingreso</h2>
<div class="user_info">
<label for="names">Name *</label>
<input type="text" id="names">
<label for="password">Pass *</label>
<input type="password" id="password">
<input type="button" value="Send" id="btnSend">
</div>
</section>
</form>
My CSS is currently this:
@media only screen and (max-width: 800px) {
.cantact_info{
display: none;
}
}
.cantact_info::before{
content: '';
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background: orange;
opacity: 0.9;
}
.cantact_info{
width: 38%;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-size: cover;
background-position: center center;
}