Jump to content

Remove padding from images and section with css in 7.1

Go to solution Solved by Beyondspace,

Recommended Posts

Posted

Site URL: https://midnight-revival.squarespace.com

Does anyone know how I can remove the padding from this section and the images within. Essentially I want the 2 images to take up the entire section but I can't seem to get rid of the background at the bottom and on the sides in mobile. Images attached.

https://midnight-revival.squarespace.com

password: midnight

I'm currently using this code but still get a sliver on the bottom for desktop and all around on mobile:

section[data-section-id="61816aad28ce603e37e25798"] .content-wrapper {
  padding-top:0 !important;
  padding-bottom:0 !important;
  padding-right:0 !important;
  padding-left:0 !important;
}

#block-yui_3_17_2_1_1636068733069_2859 {
  padding: 0px !important;
}

#block-yui_3_17_2_1_1636068733069_3898 {  
  padding: 0px !important;
}

 

 

1143421459_ScreenShot2021-11-04at6_00_30PM.thumb.png.cc7d0296a7211818afdf044c445b5407.png

Screen Shot 2021-11-04 at 5.57.32 PM.png

Posted
On 11/5/2021 at 7:02 AM, lamdra said:

Site URL: https://midnight-revival.squarespace.com

Does anyone know how I can remove the padding from this section and the images within. Essentially I want the 2 images to take up the entire section but I can't seem to get rid of the background at the bottom and on the sides in mobile. Images attached.

https://midnight-revival.squarespace.com

password: midnight

I'm currently using this code but still get a sliver on the bottom for desktop and all around on mobile:

section[data-section-id="61816aad28ce603e37e25798"] .content-wrapper {
  padding-top:0 !important;
  padding-bottom:0 !important;
  padding-right:0 !important;
  padding-left:0 !important;
}

#block-yui_3_17_2_1_1636068733069_2859 {
  padding: 0px !important;
}

#block-yui_3_17_2_1_1636068733069_3898 {  
  padding: 0px !important;
}

 

 

1143421459_ScreenShot2021-11-04at6_00_30PM.thumb.png.cc7d0296a7211818afdf044c445b5407.png

 

Is it the result you want to achieve?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

  • Solution
Posted

Try 

section[data-section-id="61846d6adeb0e63272bb2812"]  .content-wrapper {
  padding:0 !important;
}

Let me know how it works on your site

Press 👍 or mark this answer as solution to help another one too

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

Posted
6 hours ago, bangank36 said:

Try 

section[data-section-id="61846d6adeb0e63272bb2812"]  .content-wrapper {
  padding:0 !important;
}

Let me know how it works on your site

Press 👍 or mark this answer as solution to help another one too

That did it! Thank you! Can you tell me how you resolved it? Seems like I was just targeting the wrong section id but I thought I had it identified correctly. Thanks for your help.

Posted
14 hours ago, lamdra said:

That did it! Thank you! Can you tell me how you resolved it? Seems like I was just targeting the wrong section id but I thought I had it identified correctly. Thanks for your help.

Use this tool to find data section id. 

https://chrome.google.com/webstore/detail/squarespace-id-finder/igjamfnifnkmecjidfbdipieoaeghcff?hl=en

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!)

  • 11 months later...
Posted
58 minutes ago, Desnoir said:

Hi @bangank36 @tuanphan is there any way to apply this code to all sections on a website? Thanks 🙂

Just remove the section id so it would affect all element which match with your css selector. However, you need to be carefully for the global effect on your site

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

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.