Jump to content

Css: 'visibility: hidden' works not 'display: none' (SOLVED)

Recommended Posts

Site URL: https://salmon-hibiscus-r5wx.squarespace.com

Password: dante123

EDIT: I fixed it!

How? I had to target the section THEN the ID. So my CSS looks like this:

section[data-section-id="608ab106b153c010dc12f69a"] .product-quantity-input,  {
    display: none;
}

 

Hey guys,

In a single product page, I want to 'display: none' on the quantity but only 'visibility: hidden' works. Why is this?

I am targeting the right class. The reason why I want to use 'display: none' is because the "add to cart" button bumps up. When using visibility: hidden, the add to cart button does not bump up as per screenshot.

I have used 'display: none' on my front page and it works and it does bump up the "add to cart" button.

Why doesn't this css code work in the single product page?

 

Captur2e.JPG

Capture.JPG

Edited by hasher22
Link to comment
  • hasher22 changed the title to Css: 'visibility: hidden' works not 'display: none' (SOLVED)
18 hours ago, hasher22 said:

Site URL: https://salmon-hibiscus-r5wx.squarespace.com

Password: dante123

EDIT: I fixed it!

How? I had to target the section THEN the ID. So my CSS looks like this:

section[data-section-id="608ab106b153c010dc12f69a"] .product-quantity-input,  {
    display: none;
}

 

Hey guys,

In a single product page, I want to 'display: none' on the quantity but only 'visibility: hidden' works. Why is this?

I am targeting the right class. The reason why I want to use 'display: none' is because the "add to cart" button bumps up. When using visibility: hidden, the add to cart button does not bump up as per screenshot.

I have used 'display: none' on my front page and it works and it does bump up the "add to cart" button.

Why doesn't this css code work in the single product page?

 

Captur2e.JPG

Capture.JPG

You can use this to target ALL the product pages

.collection-type-products.view-item  .product-quantity-input  {
    display: none !important;
}

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

@hasher22 Do you need to fix these?

Site URL: https://salmon-hibiscus-r5wx.squarespace.com/

1. (Tablet-Homepage) Huge bar on right of screen

salmon-hibiscus-r5wx_optimized.squarespa

2. (Tablet-Homepage)

salmon-hibiscus-r5wx_optimized.squarespa

3. (Tablet-Footer) Change to 2 columns?

salmon-hibiscus-r5wx_optimized.squarespa

4. (Cakes) You haven’t changed SEO Title so the browser tab name still shows “Store 2”

salmon-hibiscus-r5wx.squarespace.com-04.

5. (Mobile-Products) Move description to left a bit?

salmon-hibiscus-r5wx_optimized.squarespa

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.