Digital experiences for all disciplines
New Landing › How can we help? › Atelier › Change width of accordion
New Landing › How can we help? › Atelier › Change width of accordion
- This topic has 6 replies, 3 voices, and was last updated 8 years by Mohammad – SUPPORT.
-
Posted in: Atelier
-
December 30, 2015 at 6:16 pm #237745
I’ve done some customisation to my site to include an accordion displaying Woocommerce product attributes below the short product description. Unfortunately, they are running off of the page, and I cannot find the appropriate CSS to reign it back in. Could you help point me in the correct direction?
At the moment, this is being done on a local dev machine, and not live anywhere. However, I have posted the code that I’ve included in my template below, and attached a screenshot of the behaviour.
Thanks in advance
<?php $fabricvalues = get_the_terms( $product->id, 'pa_fabric'); $carevalues = get_the_terms( $product->id, 'pa_product-care'); ?> <section class="container"><div class="row"> <div class="spb_accordion spb_content_element" data-active=""> <div class="spb_wrapper spb-asset-content spb_accordion_wrapper "> <div class="spb_accordion_section group"> <h4><a href="#fabric" id="fabric">Fabric</a></h4> <div class="row-fluid"> <section class="container"><div class="row"> <div class="spb_content_elementspb_text_column"> <?php foreach ( $fabricvalues as $fabricvalue ) { echo $fabricvalue->name; } ?> </div> </div> </div> </div> </div> </div> <section class="container"><div class="row"> <div class="spb_accordion spb_content_element" data-active=""> <div class="spb_wrapper spb-asset-content spb_accordion_wrapper "> <div class="spb_accordion_section group"> <h4><a href="#care" id="fabric">Product Care</a></h4> <div class="row-fluid"> <section class="container"><div class="row"> <div class="spb_content_elementspb_text_column"> <?php foreach ( $carevalues as $carevalue ) { echo $carevalue->name; } ?> </div> </div> </div> </div> </div> </div> </section> </section>
Attachments:
You must be logged in to view attached files.December 31, 2015 at 9:54 am #237787Hi,
Please use this custom css code:-.spb_accordion_wrapper{ width:100% !important; }
Thanks
MohammadDecember 31, 2015 at 12:12 pm #237814Thanks Mohammad
I was able to constrain it using:
.spb_accordion_wrapper{ width:400px!important; }
However something is still causing the page to scroll horizontally as if the width had not been set – please see attached screenshot.
Thanks again
Attachments:
You must be logged in to view attached files.December 31, 2015 at 12:17 pm #237816Hi,
I am not sure about it. I need live website url to check and resolve the issue.
Thanks
MohammadDecember 31, 2015 at 3:25 pm #237826This reply has been marked as private.December 31, 2015 at 7:30 pm #237832It seems like you have something inside one of the accordion content areas thats forcing the parent element to stretch.
Look at the code/html of what you have in each accordion item – The theme does not support other shortcodes inside of accordions or tabs very well.January 1, 2016 at 8:14 am #237847Hi,
@JackV – Great thanks to your suggestion.
Mohammad -
Posted in: Atelier
You must be logged in and have valid license to reply to this topic.