Accordion Tab Height

This topic has been marked as not a support question.

Hi,

I’m using the Visual Editor to make use of the accordion section shortcode. It’s working fine other than I’d really like it to display each section’s height dependent on how much content is in that section. To clarify, at the moment say I have one section having enough content to have a height of 500px, it is forcing all sections to be that height even smaller ones which say have a content filler height of 200px, leaving a lot of white space.

When inspecting element using Chrome it’s showing the code as:

<div id="ui-accordion-1-panel-1" aria-labelledby="ui-accordion-1-header-1" role="tabpanel" aria-expanded="true" aria-hidden="false" style="display: block; height: 520px;">
				 <div>
	<div>
		<div>

<p>content</p>

		</div>
	</div> </div>
				</div>

So it is possible to see that at the end of the top div for the content it is adding the style=” tag of height:520px on default to all of the section. If I disable the “height:520px” element in the chrome tool, it works just how it should. Is there anyway I can turn this off so that each section creates it’s only height value dependent on what content is in that section alone?

Thanks for any help!

January 31, 2014 at 3:05 am #30219

Hello,

The only way to do this is to modify the Visual Composer plugin, which is not easy task and could not be covered by the free support offered by this forum.

Best Regards,
ThemeBurn team

February 5, 2014 at 9:38 am #30310

Had the same problem with pavilion theme – You can use jquery to select the specific ID of the tab and change the attribute via css.

For example: $(“#ui-accordion-1-panel-1″).css({‘height’:”}) to remove the height attribute via css or completely remove the style attribute via $(“#ui-accordion-1-panel-1″).removeAttr(“style”)

 axanne
May 26, 2015 at 1:54 pm #41104
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.