MyBB Community Forums

Full Version: How can I make a photo responsive?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can I make this code responsive?

.member_head {
    position: relative;
    float: left;
    width: 100%;
    height: 165px;
    background: url(../../../../../images/photos/member_back.png);
    background-size: cover;
    box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, .30);
}

For mobile I want the height to be 50px not 165px. How can I do it?
Use CSS media query, Example
@media only screen and (max-width: 420px) {
 .member_head {
     height: 50px;
}
}

NOTE: You will need to use meta viewport in your website header.

Regards
WallBB