Slider height
-
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.
Removed 2 duplicate replies.
ModQuote:Is it possible to have a variable height?Not with CSS. It would require some scripting.
ModYou 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
ModQuote: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.