Targeting mobile for a "spacer" content block

thomasoberlinthomasoberlin Registered Users Posts: 2 Beginner grinner
Hello,

I would like to assign specific properties to a "spacer" content block when it's displayed on mobile, since I don't want as much space displayed.

I would like the space between the header and the title to either disappear on be much smaller on mobile.

I tried the following code but to no avail
------------------------------------------------------------------------------------------------------------------------------------------------------
div.spacer {
min-height: calc(62vh - 290px);
}

@media all and (min-width:960px) and (max-width: 1024px) {
div.spacer {
min-height: calc(30vh - 100px);
}
}
------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks!
Thomas

Comments

  • thomasoberlinthomasoberlin Registered Users Posts: 2 Beginner grinner
    edited January 29, 2018
    So I figured it out in the meantime...
    The correct code is:

    ------------------------------------------------------------------------------------------------------------------------------------------------------
    div.spacer {
    min-height: calc(62vh - 290px);
    }

    @media only screen and (max-width: 640px) {
    div.spacer {
    min-height: calc(30vh - 100px);
    }
    }
    ------------------------------------------------------------------------------------------------------------------------------------------------------
Sign In or Register to comment.