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
5 Views