Home Forums WoodMart support forum For image swatches, display the swatch name underneath the image

For image swatches, display the swatch name underneath the image

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #664021

    For Image swatches, display the swatch name underneath the image
    This is from Envato Discussion, author told me to post here, will give me a custom CSS to show swatch name underneath the Image and show me this screenshot
    https://monosnap.com/file/aoZpzIfMpLWmJrnnIcxTPN6SUcwX6m

    Can you please provide the css

    #664033

    Aizaz Imtiaz Awan
    Keymaster
    Xtemos team

    Hello,

    Navigate to Theme Settings -> Shop -> Variable products and enable the “Show selected option name on desktop and tablet” option – https://take.ms/jusG6

    When you select a variation on the single product page, the selected variation name will appear, like shown here: https://ibb.co/v4V5GDG7

    Best Regards,

    #664116

    I know this option, Sir — and thank you for bearing with me. But I want the text to appear under the image swatch, just like the author from Envato showed me before I made the purchase.

    I have at least 12 variation for my product, so the normal option will clutter the whole variation place

    #664345

    Aizaz Imtiaz Awan
    Keymaster
    Xtemos team

    Hello,

    Try to add the custom code, and it will add the text as you want. It only works with this style of swatches https://take.ms/AJzgs

    Please add the below Custom CSS code to Theme Settings > Custom CSS > Global Custom CSS:

    .wd-swatches-single.wd-bg-style-1 .wd-swatch.wd-bg {
        width: auto;
        height: auto;
    }
    .wd-swatches-single.wd-bg-style-1 .wd-swatch-bg {
        position: relative;
        width: var(--wd-swatch-w);
        height: var(--wd-swatch-h);
    }
    .wd-swatches-single.wd-bg-style-1 .wd-swatch.wd-bg .wd-swatch-text {
        display: block;
    }

    Best Regards,

    #664381

    It’s currently displaying in a very unappealing way — honestly, it looks quite bad.
    All I want is for the little text to appear under the image swatch, just like it’s shown here:
    https://monosnap.com/file/aoZpzIfMpLWmJrnnIcxTPN6SUcwX6m

    Attachments:
    You must be logged in to view attached files.
    #664400

    Aizaz Imtiaz Awan
    Keymaster
    Xtemos team

    Hello,

    Please remove the previous code and add the below Custom CSS code to Theme Settings > Custom CSS > Global Custom CSS:

    .wd-swatches-single.wd-bg-style-1 .wd-swatch.wd-bg {
        width: auto;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .wd-swatches-single.wd-bg-style-1 .wd-swatch-bg {
        position: relative;
        width: var(--wd-swatch-w);
        height: var(--wd-swatch-h);
    }
    
    .wd-swatches-single.wd-bg-style-1 .wd-swatch.wd-bg .wd-swatch-text {
        display: block;
        margin-top: 5px;
        text-align: center;
    }

    Best Regards,

    #666069

    its working sir thank you

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘For image swatches, display the swatch name underneath the image’ is closed to new replies.