How to change the width of a picture in a carousel
# 📖tutorials
j
add the folloing code to the bottom of your other code so that this does not overide your code NOTE: doesnt wok in emulator .bpw-card-picture { background-position: 50% 50%; background-size: cover; height: 150px; width: 100%; }
HAPPY BOT BUILDING🚀
thanks to a new CSS cours i joined 9 weeks ago i know some now
m
Isn’t that the default styles for the image? Just running it in the emulator I can see the same default styles. Would there be a reason to change the width of the visible image inside the carousel? Also if you just specify that css class you mentioned only it will get overwritten by the default.
j
so, i use this becuase i want to make the images bigger becuase the images get cut off
m
But I already see the same code by default in the emulator. Or am I missing something?
j
they dont have this code in the webchat style css ://////
i found this, then i changed a bit and then it worked
your not missing anything, but me on the other hand im missing my cat
m
lol I tested a share url link on my demo and can see that class and css you mentioned is there by default and doesn’t get overwritten, my bad. But would you ever want to change the width of the visible image?
j
yes
when you want to make it bigger, so that it wont cut off the image
when you want to make it smaller so the text appier bigger
you can make it smaller so that it seems you have an emojie
m
So the image size is set by the rule background-size: cover This effectively scales the image while preserving its aspect ratio, to fit both the width and height of its container. If you have text in the image, then there’s a good chance it could be cut off “cropped”. So if your solution is related to this then I’d suggest trying to design the image with a similar aspect ratio initially and aim to keep any text inside a general safe zone to prevent cropping.
j
im going to delete this post then aright ?
m
You could keep it or do a new one, as there’s also the height option that some people might want a little taller, the default is 150px.
I’d create a new post with just the height option, I think there’s value in being able to adjust this.
There’s also the carousel left and right buttons, maybe people want to control the appearance of the buttons as well 👀
j
sorry ii was sleeping
g
You can keep this post @jolly-policeman-82775, it's pretty interesting! 😉
j
hey man
i sent you a DM
can u check pls
@boundless-intern-1517
@n
@bored-balloon-35261
try this
3 Views