PDA

View Full Version : Relative width for panels in "Step Carousel Viewer v2.0"



halibali
02-10-2015, 10:56 PM
1) Script Title: Step Carousel Viewer v2.0

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm

3) Describe problem:

Hey guys,

I really like the Carousel Viewer and I'm glad it works correctly. I only have a css-related question: Is it possible in any way to set the width for each panel relative to the width of the "surrounding" div (e.g. 50%)? It seems only to work with absolute widths (e.g. 500px).

Here is the code I relate to (from the DD-Website above):

.stepcarousel .panel{
float: left; /*leave this value alone*/
overflow: hidden; /*clip content that go outside dimensions of holding panel DIV*/
margin: 10px; /*margin around each panel*/
width: 250px; /*Width of each panel holding each content. If removed, widths should be individually defined on each content DIV then. */
}

5588

I now want to do something like this:

.stepcarousel .panel{
float: left; /*leave this value alone*/
overflow: hidden; /*clip content that go outside dimensions of holding panel DIV*/
margin: 10px; /*margin around each panel*/
width: 70%; /*Width of each panel holding each content. If removed, widths should be individually defined on each content DIV then. */
}

5589

But as soon as I set the width to a percentage, it messes the whole script up (see also the pictures, there should be one table on every page/panel)

Thank you very much for helping

Cheers, halibali

ddadmin
02-13-2015, 08:31 AM
Hmm unfortunately there's no easy way at the moment, as that would involve a lot of changes to the code to make it work.

gatomadrid
09-15-2015, 07:12 AM
Hello
,
where can i download stepcaroulse 2.0? at this moment i'm using the version that i download from their page but theversion taht is linked is 1.91, http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm

Beverleyh
09-15-2015, 08:34 AM
Given that one of the new features in 2.0 is "navigate by swiping/ mouse dragging"...

And the linked js file includes this at the top;
swipethreshold: [50, 300], // distance traveled within x milliseconds before it is considered a swipe [pixels, milliseconds]

I would surmise that the linked file *is* the one for 2.0 - just the version number inside hasn't been updated.