Tagged: x
-
AuthorPosts
-
September 9, 2016 at 10:30 am #1168090
Hi there – I’ve got a few flip cards across a row in 4 even columns – but when I resize the screen and make it smaller, the cards and thusly their bg-image do not adapt and shrink as the screen diminishes. Is there any way to accomplish this?
September 9, 2016 at 7:13 pm #1168652Hi There,
Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
Cheers!
September 10, 2016 at 1:12 pm #1169419The sites not public yet but i’ll unlock it for a while. The url is http://www.strawberryfieldslane.com – just the home page – i also noticed that when resizing the window the 4 cards which should all be the same size, don’t scale quite evenly…any solution here? or maybe a way to hide them if someone makes the window too small?
September 11, 2016 at 12:35 am #1169802Hi there,
Please find following codes and update
background-size: cover;
property tobackground-size: contain;
:.x-card-outer.mycard2 .x-face-outer.front .x-face-inner { background-image: url('http://strawberryfieldslane.com/wp-content/uploads/2016/09/closegear1.png'); background-position: 50% 50%; background-repeat: no-repeat; background-size: cover; } .x-card-outer.mycard3 .x-face-outer.front .x-face-inner { background-image: url('http://strawberryfieldslane.com/wp-content/uploads/2016/09/closegear2.png'); background-position: 50% 50%; background-repeat: no-repeat; background-size: cover; } .x-card-outer.mycard4 .x-face-outer.front .x-face-inner { background-image: url('http://strawberryfieldslane.com/wp-content/uploads/2016/09/closemic.png'); background-position: 50% 50%; background-repeat: no-repeat; background-size: cover; } .x-card-outer.mycard5 .x-face-outer.front .x-face-inner { background-image: url('http://strawberryfieldslane.com/wp-content/uploads/2016/09/concertwindow.png'); background-position: 50% 50%; background-repeat: no-repeat; background-size: cover; }
To hide cards elements, please use visibility options under section/row settings.
Hope that helps.
September 11, 2016 at 6:46 pm #1170475Switching the code to Contain now leaves the cards not being filled by the background image – if you refresh the page now, the graphic doesn’t fit the card anymore. And resizing it make each card change in different ways. Do I need to make the actual cards smaller? I thought 200×300 was the right size for the graphics.
Thanks for the continued support
September 11, 2016 at 6:51 pm #1170479If i need to make the images another size, thats no problem either..just let me know what size they should be. Thanks
September 11, 2016 at 10:58 pm #1170706Hi there,
Since the card is responsive, its dimension will change too. Either Cover or Contain can fix it, but personally, I’ll prefer Cover since it will not leave empty space.
Since background image is only limited to its container, it will be cropped when setting to Cover. Contain means no cropping, but may leave gaps since it will try to fill the container while maintaining the aspect ratio.
You can try this,
background-size: 100% 100%;
Fit both width and height without respecting the aspect ratio, but that means it will stretch.
There is no best solution than Cover styling when working on background image.
Thanks!
September 12, 2016 at 8:30 am #1171316Thanks – the background size 100-100 and using hiding seems to be the best solution thus far. I think that solves this question. Thanks!
September 12, 2016 at 9:46 am #1171424If you need anything else please let us know.
-
AuthorPosts