I can't get a div follow the CSS rules for screens with 767px
Hi. I have a <div class="container-fluid"> and inside it are a responsive image and another div over the image. I have set some CSS rules in order to control the position of this div over the image but unfortunately it's ignoring the rule I set for 767 px screens.
<div class="container-fluid div-header-image-full">
<div class="container-fluid div-header-image">
<img src="images/headerimage.jpg" alt="Placeholder image" class="img-responsive">
<div class="div-form-header"><h3 class="h3-form-header">GET A QUOTE</h3>
<form id="form1" name="form1" method="post">
<p>
<input name="textfield" type="text" class="form-textfield-header" id="textfield" placeholder="Name"></p>
<p>
<input name="textfield" type="text" class="form-textfield-header" id="textfield" placeholder="Company"></p>
<p>
<input name="textfield" type="text" class="form-textfield-header" id="textfield" placeholder="Site url"></p>
<p>
<input name="email" type="email" class="form-textfield-header" id="email" placeholder="Email">
<p>
<textarea name="textarea" class="form-textarea-header" id="textarea" placeholder="Project details"></textarea>
<p>
<input type="submit" name="submit" id="submit" value="Submit"></p>
</p>
</p>
</form></div></div>
</div>
/*Header contact form */
.div-form-header {
background-color:aqua;
position: absolute;
right: 0;
width: 35%;
text-align: center;
top: 30px;
}
@media only screen and (max-width: 909px) {
.div-form-header {
background-color:aqua;
position: absolute;
right: 0;
width: 35%;
text-align: center;
top: 20px;
}
}
@media only screen and (max-width: 886px) {
.div-form-header {
background-color:aqua;
position: absolute;
right: 0;
width: 35%;
text-align: center;
top: 12px;
}
}
@media only screen and (max-width: 869px) {
.div-form-header {
background-color:aqua;
position: absolute;
right: 0;
width: 35%;
text-align: center;
top: 35px;
}
}
@media only screen and (max-width: 767px) {
.div-form-header {
background-color:aqua;
position: absolute;
width: 35%;
text-align: center;
}
}
.form-textfield-header {
width: 80%;
border:0;
}
.form-textarea-header {
width: 80%;
height: 80px;
border:0;
}
.h3-form-header {
color:white;
font-family: Baskerville, "Palatino Linotype", Palatino, "Century Schoolbook L", "Times New Roman", "serif";
}
/*End header contact form */
