Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Fluid width/height parent container for a jQuery slider?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #40233
    iamshawnrice
    Participant

    I am using [camera](http://www.pixedelic.com/plugins/camera/http://www.pixedelic.com/plugins/camera/”) as a content slider on [this](http://dev.magnetmediafilms.com/indextest2/about-us/ “this”) page.

    I would like to set a width/height/background image for the parent div so the space the slider will occupy is drawn prior to the slider loading, to avoid a big jump once the slider loads.

    To do that, I used the following code:
    #camera_bed {
    width: 100%;
    height: 396px;
    }
    However, the page is dynamic in width. And that height is inappropriate for smaller screen sizes.

    Has anyone else run into this issue? Is there a solution in CSS or am I going to need to get jQuery involved?

    Thanks in advance.

    #111601
    iamshawnrice
    Participant

    I found a very workable solution via Chris’s fluid video container:

    .camera_bed {
    width: 100%;
    height: 0;
    padding-bottom: 36%;
    }

    Worked like a charm!

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.