Hi,
id like to hide the word SIZE on my product page for desktop and mobile please.
Goal: hide the “Size” label on the product page (desktop and mobile) without affecting other pages.
Initial approach: add CSS in theme.css to hide label elements sitewide. Steps provided: Online Store > Themes > Edit code > Assets > theme.css, then paste a selector that hides .label and most label tags.
Issue raised: this broad selector also hides labels on other pages (Contact Us, Login, Create Account), which is not acceptable. The change needs to target only the “Size” text on product pages.
Further suggestion: another broad CSS with !important was proposed, which would similarly affect all form labels.
Latest update: a more specific CSS rule was suggested to target the product variant label only: .variant__label[for] { display: none !important; }. This aims to hide the “Size” label without impacting labels elsewhere.
Status: no confirmation yet that the targeted selector works on the given theme. An image of the product page was provided for context; code accuracy depends on the theme’s class names, so the discussion remains open.
Hi,
id like to hide the word SIZE on my product page for desktop and mobile please.
Hi @Luxurymrkt ,
You can try adding this code to your theme to hide the text
From your Shopify admin, navigate to Sales channels > online store > themes > actions > edit code
Open the theme.css file under the Assets section
Paste this code at the bottom of the file
.label, label:not(.variant__button-label):not(.text-label) {
display: none;
}
I hope it helps.
Hello there, I will help you to hide the word SIZE on your product page for both desktop and mobile and it will nothing affect your Store
@Luxurymrkt Go to assets/theme.css and paste below css at bottom of file.
.label, label:not(.variant__button-label):not(.text-label)
{
display: none !important;
}
This won’t work it’ll hide all the text on contact us page. Login, create account and anything else with a form I’ve tried it. It needs to target just the SIZE word
This won’t work it’ll hide all the text on contact us page. Login, create account and anything else with a form I’ve tried it. It needs to target just the SIZE word