2
I know it should be simple, but I’m in charge here, I have a div with ID called Login and I have to leave it as Fixed when the navigation is made of computers, so in the mobile version this div will have to be as relative, someone can exemplify how to do this?
Here my CSS:
@media only screen and (max-width: 900px) {
.informacoes, .footer-info {
display: none;
}
.login {
position: relative;
margin-top: 25%;
}
}
.login {
position: fixed;
margin-top: 7%;
z-index: 9;
background: rgba(252, 252, 252, 0.80);
padding: 30px 30px 90px;
-webkit-box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.08);
-moz-box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.08);
box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.08);
-moz-border-radius: 7px;
-webkit-border-radius: 7px;
border-radius: 7px;
transition: left 0.5s linear;
}
Face a good practice is to always put the @media last, already after all the CSS. I don’t know if it will solve... If you do not solve I will ask you to edit again and put your HTML including the head of the page and the full CSS. Also try to get this Teg inside the head
<meta name="viewport" content="width=device-width, initial-scale=1">
may solve...– hugocsl
As for the meta name are all inserted correctly, but I’ll put the code after all the CSS to see
– WPfan
@hugocsl old, perfect, it was only putting the media at the end after all the normal CSS dai worked perfectly, thank you very much... puts this consideration in your reply, which I will accept after you put that remark there of your comment
– WPfan
Ok I will edit my answer. and explain what happened. I thank :D
– hugocsl