htmlcssjavascript
New Coder
When there is a prev items, I want the prev item to show by the same width as the next item. I also want the prev item and next item to sit flush on the pages.
By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!Hiya, did you manage to fix this as i cannot see any issues :S
When there is a prev items, I want the prev item to show by the same width as the next item. I also want the prev item and next item to sit flush on the pages.
I've been messing around with the 'revealCardAmount' const in the JS, and the padding-right on the product-container in CSS.Hiya, did you manage to fix this as i cannot see any issues :S
I read all the query you mentioned so, you're making great progress with your slider implementation! To achieve the desired effect of having the previous item show with the same width as the next item and ensuring that both items sit flush on the edges of the pages, you'll need to adjust both the JavaScript and CSS.I've been messing around with the 'revealCardAmount' const in the JS, and the padding-right on the product-container in CSS.
There are some issues that persist. A portion of the prev card (where there is one) is not visible, in addition to the 5 main cards does not show. Where I have got them to both show, on every click, the width becomes gradually smaller or larger for the next and prev card. I want it to be an equal width and sit flush on the edges of the pages.
I want something like this:
I can get it sitting flush by changing overflow from hidden to visible on the slider-container, but the prev and next cards are different width.
Code Forum is a community platform where coding enthusiasts can connect with other developers, engage in discussions, ask for help, and share their knowledge with a supportive community. It's a perfect place to improve your coding skills and to find a community of like-minded individuals who share your passion for coding.
We use essential cookies to make this site work, and optional cookies to enhance your experience.