Forums

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

Home Forums JavaScript AnythingSlider for WordPress not respecting height in Chrome?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #33739
    screamline
    Member

    I’m not sure this is the place to ask questions about AnythingSlider *for WordPress*, but since my problem appears to be browser compatibility rather than anything specific to WordPress, here goes.

    All the panel DIVs in my slider contain the same child elements. The height of each element is identical on each slide. (So, Slide1’s single IMG is the same height as Slide2’s single IMG, etc.) The only exception is that each slide DIV contains a single P that varies in height from slide to slide.

    Using the WordPress Settings UI, I set AnythingSlider to use a fixed height. Works fine in IE 9 and Firefox 5: all the panels are the same height regardless of their contents. In Chrome 12, however, the fixed height is ignored; instead, panel heights seem to vary according to the height of the slide’s child P, with roughly the bottom 1/3 of each P cut off.

    I’m 100% new to jQuery, but I looked through the jquery.anythingslider.min.js file anyway. I see references to height, but I don’t know what to do with them. In particular, I see:

    a.height=a.$el.height()

    which (taking a wild guess) is maybe setting AnythingSlider’s base height to the height of its child elements, to be overridden later? If that’s so, why isn’t Chrome respecting whatever setting is supposed to do the overriding?

    #84332
    Mottie
    Member

    Hi Screamline!

    Try setting the “resizeContent” option to false, then setting the width and height of the slider and panels in the css:

    #slider, #slider .panel {
    width: 600px;
    height: 300px;
    }

    I know the WordPress plugin sets the slider dimensions, but I don’t think it sets the panel dimensions – I haven’t looked at the latest verison though.

    #84333
    screamline
    Member

    Hi Mottie! Thanks for taking the time to comment. I did have resizeContent set to false. I tried your suggested CSS and it didn’t work, unfortunately. What *did* work was clearing the height value from the WordPress Settings UI and setting the height for the slider *UL* manually in CSS. I’m not sure why that would be, but in any case, the fixed height now works properly across browsers, including Chrome.

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