-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swipeable tabs carousel height limited to 400px #4159
Comments
The problem is that the swipeable tabs are styled by the carousel css. Reference #4148 . |
This doesn't work for me. I'm currently having the same issue, and when adding the above css, the tab content just gets height 0. |
Set the height and width properties of the selector Then in a document ready function, change the height of the container to be whatever the height of the content is with a statement similar to: |
Am I the only one who doesn't even find the |
I just used this: In my custom css file. |
@mchalakov @blaconix setting the height to 100% just hides the tabs-content.carousel and carousel.item completely. Only a ___px setting will display the contents. My issue is that one of the tabs has a much longer height than the other tabs. |
Duplicate of #4148 |
@braed give me some basic codepens and I will try to help you |
I don't know what you want me to codepen, but i just want a carousel with text, but with padding so that the text doesn't touch from slide to slide, and with auto height so that the carousel can change height from item to item. I don't want to use 400px (or any absolute value) for the height. |
I also spot another weird thing when using swipeable tabs. When you try add an img tag into a tab. The carousel's height becomes 0, making the carousel disappear. To reproduce it, |
I'd also like to see the indicators become something we can add ourselves. |
Also, on a more realistic note, can we expect to see carousels given auto-scroll soon? Every other carousel has this and although it's relatively easy to implement with JS, why is it not already a feature? |
Isn't it bug that image issue followed by that limited width. |
same question: why is this closed? It's still an issue. I can't read the text in the tabs, nor can i find out why it happens at all. I can set the height at 100%, but even so it won't go above 520px in height. No idea why that is :( |
I'm getting the same 0 height issue. Any real fixes for this as it's style in the dom is set to height: 0 so no matter the CSS rule, it does not work. |
Please look here: |
I followed the suggestions of @blaconix and @, and nothing worked. |
Fix: .tabs-content.carousel .carousel-item { |
This shouldn't be closed, this is still an Issue. |
I agree, this shouldn't be closed. Please reopen... |
Facil !!! RESUELTO |
@silviosoto I'm not sure what else you might be doing but that didn't seem to work for me |
modifies the height of the property or with another height
|
New to materializecss and this is the first big issue I'v found. I try to build swipeable views (similar to navigation in WhatsApp app) but I don't even understand the reason of having a fixed height for the carousel (or swipeable tabs as well). Can anyone explain the reason behind this behaviour? Why it is necessary at least? |
Anyone stumbling across this, trying to get auto height back for the carousel item div. this fixed it for me |
I tried most of the ideas in this thread but none worked. The only way I could get it to work is hard coding the height. Not a great solution. Where is the support? |
This is a dirty fix but it does work. :) Add this to your .css file Then this to your .js file (jquery)
This js resize the tabs parent to the tallest child on its initialization, and when the window is resized. |
Thank you very much for this solution, finally one that works! It is not excellent, but good enough for what I planned to do with it. |
This one works perfectly :) Thank you very much. |
With that last fix, i noticed that when each tab is a different size with cards and rows, that it takes in the size with the most rows and adjusts all of the tabs. I made a few alterations to the javascript so it bases the height to what is being show at the time. CSS is the same Javascript
|
I've just tried it. It works perfectly. |
I have found that THIS solution is better for lazy loading of images:
|
I had a collapsible list in my tab that would push items off the bottom of the page.
seems to have fixed it for me |
Actually this is the simplest answer!
|
Just rewrote the resizeTab function in pure JS, as i'm not using JQuery:
|
The
.carousel
div
is limited to aheight
of400px
.Sometimes, an ever smaller
height
is forced with astyle
attribute.This is actually to small for the content I want to show under the tabs.
The issue:
Why is it limited to
400px
? How can I fix this?Thank you for your response.
The text was updated successfully, but these errors were encountered: