The text overlaying my images in the full website works well, but, when rendered in mobile, the text becomes unreadable because it overlays a different part of the background image. Is there a way to use a different crop of the same image for the mobile version so that the text overlays the image properly? Any help is certainly appreciated.
Yes once you have cropped an image (I also cropped it for you so you can upload it on your wordpress site), locate your css file (“style.css”) and open it for edit:
Then in style.css search for “.cover.fullscreen” (You can also search by pressing CTRL + F)
When you have located it you will find this code:
@media all and (max-width: 767px) {
.cover.fullscreen {
height: auto;
padding: 0;
}
}
Add the following lines to the code:
@media all and (max-width: 767px) {
.cover.fullscreen {
height: auto;
padding: 0;
background-position: center;
background-image: url("https://i.imgur.com/TIFIG5l.jpg"); /*Link of new image*/
background-repeat: no-repeat;
background-size: cover;
}
}
**** Extra tips:
To make text more visible when scrolling over image on desktop do the following:
Search in “style.css” (CTRL + F) for “.image-bg h3, .image-bg h1”
The only thing I want to add here is that not recommended to modify theme files for CSS changes, just add them in the Appearance > customize > additional CSS, all your changes will lost after update
This is all great help, @nkulic, especially the text shadow point out. Thanks!
However, it doesn’t really get to the heart of the matter, which is that the layout of this photo in the full website is essentially landscape, but it renders in mobile as portrait. Is there a way to use a different photo or different crop for the different versions of the site?
Of note, I added the code you suggested for ‘@media,’ as additional CSS, and it didn’t appear to change anything. Perhaps because this is a parallax section image, and not a background image, so I’m not sure the pointer is to the correct image. (Still new at this stuff, and learning bit by bit.)
Actually, if I could just control the width of the image so that the width in the “background full” image position renders the same as the “background small” image position, I think it would be ok. I assume this is controlled by the Additional CSS code you suggested, and I just need some small edit to manage the correct parameters - just don’t know what they are.
@Nkulic, thank you for all your effort, its highly appreciated but I want to add one thing, please don’t suggest to edit any theme files, these CSS rules can be overridden in Appearance > customize > additional CSS