-
Anonymous
I’m experiencing a critical issue with the GeneratePress Carousel Block where carousel items are receiving an incorrect inline width style of width: 1.11848e+07px (over 11 million pixels) instead of the expected calculated width.
Issue Details:Affected element: .gb-carousel-item
Incorrect inline style: style=”width: 1.11848e+07px; margin-right: 20px;”
Expected behavior: Items should have auto or calculated width based on slides-per-view setting
Browser: All browsers
Device: Occurs particularly on screens below 1024px widthCurrent Settings:
Slides Per View: 4
Space Between: 20px
Initialize at width: 0 (also tested with empty value)
Infinite Loop: Enabled
Free Mode: Disabled
Free Mode Sticky: Disabled
Slides Per Group: 1HTML Output:
The carousel container has correct data attributes:
html<div class=”gb-carousel”
data-slides-per-view=”4″
data-space-between=”20px”
data-gb-carousel-min-width=”0″
data-gb-carousel-initialized=”true”>
But individual items receive the wrong width:
html<div class=”gb-carousel-item”
style=”width: 1.11848e+07px; margin-right: 20px;”>Carousel items should automatically calculate their width based on the container width and slides-per-view setting without requiring CSS overrides.
Steps to Reproduce:Add Carousel Block to page
Set Slides Per View to 4
Set Initialize at width to 0 or leave empty
Add 7 carousel items with images
View page on any screen size
Inspect carousel items – they have extreme width values -
George
Hello.
Have you set up a page with the carousel?
-
Anonymous
I fixed it, thanks for checking tho
-
George
Good, no problem!
- You must be logged in to reply to this topic.