Jump to content

Can't find the position:absolute of this div


harry_ord

Recommended Posts

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

Nq3sfJ.png

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...