min-height, doesn’t work on mobile what do I do?

Asked

Viewed 163 times

0

I’m developing a desktop and mobile site, but when I’m on mobile, I have to decrease the height of the slider on the right mobile, however when I put min-height:250px ! Mportant, it won’t , even if I try in every way I can not solve see the example

Desktop code :

.banner ul li {
    display: block;
    float: left;
    width: 33%;
    padding: 160px 0 110px;
    min-height: 506px !important;
    box-shadow: inset 0 -3px 6px rgba(0,0,0,.1);
}

Mobile Code :

@media screen and (max-width:320px) {
    .banner ul li {
         min-height:250px  !important;
         overflow:hidden;
         background-size: 100% 250px !important;
         box-shadow: inset 0 -3px 6px rgba(0,0,0,.1);
    }
}

======

can tell me what I can do ?

  • Does the desktop browser have a problem too? (resizing the window to below 320px)

  • not fish, the problem only works with the 320px, when I try to put this code min-height:250px ! Important; it does not obey !

  • @Edwardjunior, put your code on http://jsfiddle.net and put the link here that is easier to test.

  • already got VLW galley In the main code I was putting ! Important, was giving conflict already got vlw

1 answer

1

The problem is that you have a condition for medias of the type screen, that mobile is not a part of. Remove this condition, leaving this way:

@media (max-width:320px) {
    .banner ul li {
        min-height:250px  !important;
        overflow:hidden;
        background-size: 100% 250px !important;
        box-shadow: inset 0 -3px 6px rgba(0,0,0,.1);
    }
}

Working example: http://jsfiddle.net/fcekLLLz/embedded/result/

  • Oeslei nada ! is the same code bro -_-

  • It’s not the same, I removed the condition screen. Try putting your example in jsfiddle as André quoted.

  • didn’t solve anything, buddy !

  • you don’t understand it has nothing to do with @media but with the code -_- media has nothing to do with.

  • That’s why we ask you to put the code in jsfiddle. It’s easier to analyze with a real example.

  • There’s no big code !

  • 2

    @Edwardjunior added a jsfiddle to the answer, and as you can see, it works. We can’t help you if we don’t have more information about the problem.

  • I already got ! Mportant, in the main condition vlw Oeslei and André

Show 3 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.