set height to jquery ui accordion

HungryDB picture HungryDB · Dec 9, 2013 · Viewed 12.8k times · Source

I'm using jquery ui accordion.

$(function() {
    $( "#accordion" ).accordion({
        collapsible:true,
        active : 'none',
        autoHeight: false,
         navigation: true
        });
  });

and using CSS

#accordion
{
    width:70%;
    height:400px;
    padding-top:80px;
    padding-left:100px;
}

But the content of my first accordion div is large. so when i open that div/header. accordion goes beyond footer. How to set the height for accordion?

Answer

Arun P Johny picture Arun P Johny · Dec 9, 2013

So try

#accordion .ui-accordion-content {
    max-height: 200px;
}

Demo: Fiddle