harry_ord Posted October 12, 2016 Share Posted October 12, 2016 Hello This is my page:http://codelcolab.feriapixel.cl/When i resize the window to less than 600px, my div called "portada" and its inner div with id "polina" gain a position:absolute attribute, i don't know why. I just want those div to appear at the start of the page with position static (the default). How can i do it? i already tried to give both divs the position:static attribute in the stylesheet but it doesn't seem to work.The text appear all over the page and it looks horrible. Help. :c Link to comment Share on other sites More sharing options...
harry_ord Posted October 12, 2016 Author Share Posted October 12, 2016 How can i delete this topic? it's already solved. Link to comment Share on other sites More sharing options...
davej Posted October 12, 2016 Share Posted October 12, 2016 Why don't you post the solution? Link to comment Share on other sites More sharing options...
harry_ord Posted October 12, 2016 Author Share Posted October 12, 2016 I used media queries.I put a display:none attribute for the troublesome div like this for the screens narrower than 600px:@media screen and (max-width: 600px) { .portada { width: 200px; height: 100px; position: relative; top: -600px; display: none; }And then i created a new div called "hidden" with display: none in the general stylesheet but then i created a media query to display it on the small screens like this: @media screen and (max-width: 600px) { .oculto { display: block; text-align: center; margin-top: 30px; background: url("../img/ref-18939665-b.png"); background-size: cover; color: white; padding: 20px; } } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now