The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Min height without stretching the image, CSS-Mediaqueries

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #205397
    Kevin Mamaqi


    I’m trying to solve a problem I got when an user views my website from mobile devices: The problem is that the picture is wider and for large screens (desktop) the code works well, it resizes and got a max-height property which limits it, but, for smaller devices is not good enough, the image is to small and is impossible to visualize the picture.

    I can’t find a solution without having a large horizontal scrollbar, which is not very convenient.


    You could set the image as a background image on the div.artistas-bg, then set:

    background-size: cover;
    background-repeat: no-repeat;
    background-position: center 30px;

    This should scale the image to look quite nice on mobile.

    Kevin Mamaqi

    I can’t set it as a background image (or I don’t know how), it is the featured image of a WordPress article.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.