function yit_size_images_style() { $content_width = $GLOBALS['content_width']; $shop_catalog_w = 100 * yit_shop_catalog_w() / $content_width; $info_product_width = 100 - $shop_catalog_w; ?> <style type="text/css"> .woocommerce ul.products li.product.list .product-wrapper .thumb-wrapper { width: <?php echo $shop_catalog_w; ?> %; height: auto; } .woocommerce ul.products li.product.list .product-wrapper .info-product { width: <?php echo $info_product_width - 2; ?> %; } .woocommerce ul.products li.product.list .product-wrapper span.onsale { <?php if (!is_rtl()) { ?> right: <?php echo $info_product_width + 0.61; ?> %; <?php } else { ?> left: <?php echo $info_product_width + 0.61; ?> %; <?php } ?> } .woocommerce ul.products li.product.list .product-wrapper .product-meta { width: <?php echo $info_product_width - 2; ?> %; } </style> <?php }
function yit_size_images_style() { $content_width = yit_get_sidebar_layout() == 'sidebar-no' ? 1170 : 870; $margin = 30 / $content_width * 100; // 30px $margin_thumbnails = 8 / $content_width * 100; // 8px $images_container_w = yit_shop_single_w() / $content_width * 100; $thumbnails_container_w = $content_width - (yit_shop_single_w() + 30) - $margin_thumbnails; ?> <style type="text/css"> ul.products li.product.list .product-wrapper { padding-left:<?php echo yit_shop_catalog_w() + 30 + 7 + 2; ?> px; } ul.products li.product.list .product-wrapper a.thumb { margin-left:-<?php echo yit_shop_catalog_w() + 30 + 7 + 2; ?> px; width: <?php echo yit_shop_catalog_w(); ?> px; } .single-product.woocommerce div.product.product-layout-1 div.images { width:<?php echo $images_container_w; ?> %; } .single-product.woocommerce div.product.product-layout-1 div.images .thumbnails { width:<?php echo $thumbnails_container_w / yit_shop_single_w() * 100; ?> %; } .single-product.woocommerce div.product.product-layout-1 div.summary { width:<?php echo 100 - $images_container_w - $margin; ?> %; } </style> <?php }
function yit_size_images_style() { $content_width = $GLOBALS['content_width']; $shop_catalog_w = ( 100 * yit_shop_catalog_w() ) / $content_width; $info_product_width = 100 - $shop_catalog_w; ?> <style type="text/css"> .woocommerce ul.products li.product.list .product-wrapper .thumb-wrapper { width: <?php echo $shop_catalog_w ?>%; height: auto; } .woocommerce ul.products li.product.list .product-wrapper .product-actions-wrapper, .woocommerce ul.products li.product.list .product-wrapper .product-meta-wrapper { width: <?php echo $info_product_width -2?>%; } </style> <?php }
function yit_size_images_style() { $content_width = yit_get_sidebar_layout() == 'sidebar-no' ? 1170 : 870; $margin = 30 / $content_width * 100; // 30px $margin_thumbnails = 8 / $content_width * 100; // 8px $images_container_w = (yit_shop_single_w() + 16) / $content_width * 100; $thumbnails_container_w = $content_width - (yit_shop_single_w() + 16 + 30) - $margin_thumbnails; ?> <style type="text/css"> ul.products li.product.list .product-wrapper { padding-left: <?php echo yit_shop_catalog_w() + 30 + 7 + 2; ?> px; min-height: <?php echo yit_shop_catalog_h() + 7 + 2; ?> px; } ul.products li.product.list .product-wrapper .thumb-wrapper { margin-left: -<?php echo yit_shop_catalog_w() + 30 + 7 + 2; ?> px; width: <?php echo yit_shop_catalog_w() + 10; ?> px; height: <?php echo yit_shop_catalog_h() + 8; ?> px; } ul.products li.product.list .product-wrapper img.onsale { left: <?php echo yit_shop_catalog_w() + 3 - 63; ?> px; } .og-expander.woocommerce div.product div.images div.thumbnails { height: <?php echo yit_shop_thumbnail_h() + 10; ?> px; } .single-product.woocommerce div.product.product-layout-1 div.images { width: <?php echo $images_container_w; ?> %; } .single-product.woocommerce div.product.product-layout-1 div.summary { width: <?php echo 100 - $images_container_w - $margin; ?> %; padding-bottom: <?php echo yit_shop_thumbnail_h(); ?> px; } </style> <?php }
function yit_size_images_style() { if (!is_shop() && !is_product_category()) { return; } $content_width = $GLOBALS['content_width']; $shop_catalog_w = 100 * yit_shop_catalog_w() / $content_width; $info_product_width = 100 - $shop_catalog_w; ?> <style type="text/css"> .woocommerce ul.products li.product.list .product-wrapper .thumb-wrapper { width: <?php echo $shop_catalog_w; ?> %; height: auto; margin-right: 2%; } .woocommerce ul.products li.product.list .product-wrapper .product-meta-wrapper, .woocommerce ul.products li.product.list .product-wrapper .product_actions_container { width: <?php echo $info_product_width - 2; ?> %; } </style> <?php }