Slider height

  • puffin

    #6252

    I am using WordPress 3.4.2 with the Graphene Theme 1.8.2 with a Child Theme.

    I display a post in the slider and have the following code in Custom css

    .featured_slider #slider_root {
    background: #fff;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    height: 425px;
    width: 100%;
    }

    The height of 425px seems to cover the longest post but us too deep for the shorter posts.

    Is it possible to have a variable height?

    I have tried

    min-height: 200px;
    max-height: 425px:

    but it doesn’t seem to work.

    Prasanna SP

    #33832

    Removed 2 duplicate replies.

    puffin

    #33833

    Just tried another 2 options and neither work.

    height: 100%;

    removing the height altogether

    Does anyone have any other suggestions?

    puffin

    #33834

    I tried yet another option without success.

    height: auto;

    doesn’t work! Surely there must be a way?

    puffin

    #33835

    I still have this problem.

    I seem to be taking to myself – no-one has added any suggestions!

    Mod

    Kenneth John Odle

    #33836
    Quote:
    Is it possible to have a variable height?

    Not with CSS. It would require some scripting.

    puffin

    #33837

    What do you mean by scripting – where would it be needed?

    I might add that I only want to display ONE post – just the next concert.

    Mod

    Kenneth John Odle

    #33838

    You can adjust the height of <div>‘s by using JavaScript.

    This probably will NOT help you, but will give you some idea of the complexity you are facing:

    http://stackoverflow.com/questions/33080/setting-the-height-of-a-div-dynamically

    Mod

    Kenneth John Odle

    #33839
    Quote:
    I might add that I only want to display ONE post – just the next concert.

    I’ve been thinking about this. This really isn’t what a slider is for. You might want to forgo the slider altogether, add a Graphene action hook widget, and use some PHP to get the excerpt of the desired post.

    I’m not sure of the code needed to handle this, as I don’t have the time right now to figure it out, but it’s an idea in a different direction, at least.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.