Forums

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

Home Forums CSS resizing of background image in block Reply To: resizing of background image in block

#282308
Shikkediel
Participant

I think you can leave the domain itself out in any case, using the absolute path is usually preferable. So that would just be:

background-image: url(/uploads/2018/05/rsz_foto-340-bewerkt.jpg);

The identifiers you used in the first post don’t really match the actual layout on your site, so I’ll be using what I see on the page source. From that I would go about it this way:

.wpb_wrapper > div {
 background-position: 50%;
 background-repeat: no-repeat;
 background-size: cover;
}

.vc_custom_1549385221774 {
 background-image: url(/wp-content/uploads/2019/02/IMG_4733-bewerkt-3.jpg);
}

I’m adding that it is circumventive to see its effects while using developer tools so the code is somewhat of a guess, assuming the last rule there is a unique identifier for that particluar element.