Site logo

Archived topic

Product Tabs h2

7 replies · Started by Ash on May 10, 2021

Viewing posts 1–8 of 8

So I'm using the following function to stack product tabs

function woocommerce_output_product_data_tabs() {
   $product_tabs = apply_filters( 'woocommerce_product_tabs', array() );
   if ( empty( $product_tabs ) ) return;
   echo '<div class="woocommerce-tabs wc-tabs-wrapper">';
   foreach ( $product_tabs as $key => $product_tab ) {
      ?>
         <div id="tab-<?php echo esc_attr( $key ); ?>">
            <?php
            if ( isset( $product_tab['callback'] ) ) {
               call_user_func( $product_tab['callback'], $key, $product_tab );
            }
            ?>
         </div>
      <?php         
   }
   echo '</div>';
}

But I can no longer use .woocommerce-tabs h2{} for css, any ideas??

Hi there,

that CSS still works, i checked the selector and they are correct and i added this CSS to the site via dev tools and it worked:

.woocommerce-tabs h2{
    font-size: 400px; 
}

Maybe the cache needs clearing?

Oops sorry David. I forgot to exclude admin from cache when I was working on it.

Another thing additional information table is missing the left border?

There is some CSS in the cache that is setting border: 0; and then only reapplying the top border.
Not sure if it just requires the cache to be cleared - if not then you can add it back like so:

.woocommerce table.shop_attributes {
    border-left: 1px dotted rgba(0,0,0,.1);;
}

Thanks for that. How can I make the add to cart button wider, so the quanity and cart button inline match the product form width?

Try this CSS:

.woocommerce div.product form.cart .button {
    flex: 1;
}

Great thank you.

You're welcome

This archived topic is closed to new replies.