-
Notifications
You must be signed in to change notification settings - Fork 146
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
disable movingboxes on resize below a certain browser width or stop it from setting the height of div.mb-scroll #103
Comments
Can you please share a demo (modify this one if you could) of the issue you're having. Does the height get too large or something? Have you tried setting a panel height with overflow? |
its not a problem as such, what i'm trying to do is revert back to avertical list of items rather than having the panels and the controls when the screen size is small, effectively turning off movingboxes completely if you see what i mean. The result i'm after would be as if javascript is disabled. Esentially what i'm trying to do is simplyfy the design at smaller screen sizes and do away with having controls to see a slide, instead just displaying everything in a simplified list. I hope that makes more sense |
Hmm, maybe try using a media query (demo) #slider {
width: 300px;
}
#slider li {
width: 150px;
}
@media all and (max-width: 350px) {
.movingBoxes a.mb-scrollButtons,
.movingBoxes .mb-left-shadow,
.movingBoxes .mb-right-shadow,
.movingBoxes .mb-controls {
display: none;
}
.movingBoxes.mb-wrapper,
.movingBoxes #slider {
width: auto;
border: 0;
box-shadow: 0 0 0;
}
.movingBoxes .mb-scroll,
.movingBoxes #slider {
height: auto !important;
overflow: visible;
}
.movingBoxes #slider {
/* match #slider li width seen above */
width: 150px !important;
position: static !important;
padding: 0 !important;
}
.movingBoxes #slider li {
float: none;
cursor: default;
padding: 10px;
/* match #slider li width seen above */
width: 150px !important;
font-size: 1em !important;
}
} The only problem I noticed is if you start with the window narrow then expand it, the MovingBoxes doesn't set up properly. |
thats pretty much what i'd already tried but i wasn't using !important so the inline height style which movingboxes adds was getting priority, this fixes it so it appears to be working as i need it to now. |
Hi, is there a way i can disable movingboxes below a certain browser width so that it reverts back to a basic unordered list or a way that i can stop it from setting the height of div.mb-scroll (probably the better option).
It would need to work on$(window).resize, i already use slider.options.width and slider.options.panelWidth on $ (window).resize
Thanks,
Scott
The text was updated successfully, but these errors were encountered: