Hi, I am using a spry accordion on my site and I need the height of the content to change depending on how much there is in each panel of content. So that each content panel has an individual height. How can I do this?

Here is all the default spry accordion code mixed with bits that I've added and edited.

Code:
@charset "UTF-8";

/* SpryAccordion.css - version 0.5 - Spry Pre-Release 1.6.1 */

/* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */

/* This is the selector for the main Accordion container. For our default style,
 * we draw borders on the left, right, and bottom. The top border of the Accordion
 * will be rendered by the first AccordionPanelTab which never moves.
 *
 * If you want to constrain the width of the Accordion widget, set a width on
 * the Accordion container. By default, our accordion expands horizontally to fill
 * up available space.
 *
 * The name of the class ("Accordion") used in this selector is not necessary
 * to make the widget function. You can use any class name you want to style the
 * Accordion container.
 */
.Accordion {
	border:none;
	overflow:hidden;
	padding:0px;
	margin:0px;
}

/* This is the selector for the AccordionPanel container which houses the
 * panel tab and a panel content area. It doesn't render visually, but we
 * make sure that it has zero margin and padding.
 *
 * The name of the class ("AccordionPanel") used in this selector is not necessary
 * to make the widget function. You can use any class name you want to style an
 * accordion panel container.
*/
.AccordionPanel {
	margin: 0px;
	padding: 0px;
}

/* This is the selector for the AccordionPanelTab. This container houses
 * the title for the panel. This is also the container that the user clicks
 * on to open a specific panel.
 *
 * The name of the class ("AccordionPanelTab") used in this selector is not necessary
 * to make the widget function. You can use any class name you want to style an
 * accordion panel tab container.
 *
 * NOTE:
 * This rule uses -moz-user-select and -khtml-user-select properties to prevent the
 * user from selecting the text in the AccordionPanelTab. These are proprietary browser
 * properties that only work in Mozilla based browsers (like FireFox) and KHTML based
 * browsers (like Safari), so they will not pass W3C validation. If you want your documents to
 * validate, and don't care if the user can select the text within an AccordionPanelTab,
 * you can safely remove those properties without affecting the functionality of the widget.
 */
.AccordionPanelTab {
	background-color: #151515;
	border-bottom:1px dotted #333;
	border-top:1px dotted #333;
	margin: 0px;
	padding: 2px;
	cursor: pointer;
	-moz-user-select: none;
	-khtml-user-select: none;
	height: 120px;
	font-size:90px;
	font-family:Tahoma, Geneva, sans-serif;
	text-align:center;
	font-weight:bold;
	color:#FFDD22;
}

/* This is the selector for a Panel's Content area. It's important to note that
 * you should never put any padding on the panel's content area if you plan to
 * use the Accordions panel animations. Placing a non-zero padding on the content
 * area can cause the accordion to abruptly grow in height while the panels animate.
 *
 * Anyone who styles an Accordion *MUST* specify a height on the Accordion Panel
 * Content container.
 *
 * The name of the class ("AccordionPanelContent") used in this selector is not necessary
 * to make the widget function. You can use any class name you want to style an
 * accordion panel content container.
 */
 
.AccordionPanelContent {
	overflow: auto;
	margin: 0px;
	padding: 0px;
	background-color:#FFDD22;
	color:#151515;
	border:none;
}

.AccordionPanelContent h1 {
	font-size:56px;
	font-family:Tahoma, Geneva, sans-serif;
}

.AccordionPanelContent p {
	font-size:36px;
	font-family:Tahoma, Geneva, sans-serif;
}

/* This is an example of how to change the appearance of the panel tab that is
 * currently open. The class "AccordionPanelOpen" is programatically added and removed
 * from panels as the user clicks on the tabs within the Accordion.
 */
.AccordionPanelOpen .AccordionPanelTab {
	background-color: #151515;
}

/* This is an example of how to change the appearance of the panel tab as the
 * mouse hovers over it. The class "AccordionPanelTabHover" is programatically added
 * and removed from panel tab containers as the mouse enters and exits the tab container.
 */
.AccordionPanelTabHover {
	color: #FFDD22;
}

/* This is an example of how to change the appearance of all the panel tabs when the
 * Accordion has focus. The "AccordionFocused" class is programatically added and removed
 * whenever the Accordion gains or loses keyboard focus.
 */
.AccordionFocused .AccordionPanelTab {
	background-color: #151515;
	color:#FFDD22;
}

/* This is an example of how to change the appearance of the panel tab that is
 * currently open when the Accordion has focus.
 */
.AccordionFocused .AccordionPanelOpen .AccordionPanelTab {
	background-color: #151515;
	color:#FFDD22;
}
/* Rules for Printing */

@media print {

  .Accordion {
  overflow: visible !important;
  }
  
  .AccordionPanelContent {
  display: block !important;
  overflow: visible !important;
  height: auto !important;
  }
}

and the accordion html code

Code:
<div id="Accordion1" class="Accordion" tabindex="0">
  <div class="AccordionPanel">
    <div class="AccordionPanelTab">Home</div>
    <div class="AccordionPanelContent" id="home">
    <h1>Your Title</h1>
    <p>
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi fermentum fermentum leo, vitae pharetra lacus tempus in. Fusce id enim quam. Nulla convallis vestibulum sollicitudin. Aenean enim nisi, mollis vel eleifend in, pulvinar eget ligula. Duis commodo egestas congue. Aenean non est lectus, a luctus libero. Sed sed lectus a est varius ultricies. Aenean purus nunc, dictum vel hendrerit vitae, lobortis congue eros. Etiam pretium massa vitae odio rutrum nec eleifend lacus lobortis. Quisque cursus porttitor feugiat. Vivamus dignissim tellus eu velit consectetur mattis. Quisque pulvinar iaculis libero, at eleifend libero cursus sed. Morbi odio elit, volutpat vitae suscipit in, vehicula quis urna. Morbi sed placerat lacus. Donec rhoncus est in odio auctor quis pretium nibh scelerisque. Vestibulum arcu lectus, tincidunt et mollis vitae, aliquet non diam. Maecenas consectetur nulla sed risus dapibus ultricies. Morbi ultrices mauris in magna mollis iaculis. Nam lorem ipsum, vulputate ut rutrum at, tristique non metus.
<br />
<br />
Aenean eu aliquam nunc. *** sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean commodo, odio sit amet eleifend scelerisque, nisi mi gravida augue, ac commodo dolor eros non nibh. Aliquam mattis erat volutpat ipsum iaculis condimentum. Nunc venenatis odio vitae elit lobortis nec ullamcorper orci aliquam. Sed viverra lacus vulputate arcu viverra a ornare ipsum dignissim. Duis feugiat elementum enim, et fringilla turpis tempor et. Ut elementum, mi quis sagittis laoreet, eros nisi eleifend libero, non placerat ligula est ac arcu. Nunc sagittis porttitor euismod. Etiam eget lorem sed ante bibendum convallis. Quisque accumsan interdum nibh a tristique. Nunc tortor magna, ornare sed sodales ac, tempus a sem. Cras dignissim sodales magna, quis sodales nibh venenatis ut. Cras at sollicitudin lectus. 
     </p>
    </div>
  </div>
  <div class="AccordionPanel">
    <div class="AccordionPanelTab">About</div>
    <div class="AccordionPanelContent" id="about">Content 2</div>
  </div>
    <div class="AccordionPanel">
    <div class="AccordionPanelTab">Gallery</div>
    <div class="AccordionPanelContent" id="gallery">Content 3</div>
  </div>
    <div class="AccordionPanel">
    <div class="AccordionPanelTab">Videos</div>
    <div class="AccordionPanelContent" id="videos">Content 4</div>
  </div>
    <div class="AccordionPanel">
    <div class="AccordionPanelTab">Contact</div>
    <div class="AccordionPanelContent" id="contact">Content 5</div>
  </div>
</div>
<script type="text/javascript">
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
</script>
Please say if your need to see the javascript file too.

Thanks
Thomas