Jump to content

Exclude universal line padding code for 1 specific block

Go to solution Solved by tuanphan,

Recommended Posts

/*
===================================
   LINE PADDING CODE
===================================
*/

/* Apply padding to all Line blocks */
.sqs-block-horizontalrule {
    padding-top: 10px !important; 
    padding-bottom: 10px !important; 
}

/* Reset padding for specific element with ID */
body:not(#block-yui_3_17_2_1_1691745460420_38410) .sqs-block-horizontalrule {
    padding-top: 0 !important; 
    padding-bottom: 0 !important; 
}

web: https://ellipse-teal-dl5w.squarespace.com/motion/wellfamily-3wcx4
pass: 04

Hi,
I'm trying to have universal code on all my line padding. Except for the footer line. The footer line block is #block-yui_3_17_2_1_1691745460420_38410.

I've tried a bunch of code variations to no avail.
The "body:not" code is resetting all the lines not just the the footer line like i would like. Something is wrong with the code. 
Need some help to learn the right way to exclude elements when universal code is applied.

Cheers 


image.thumb.png.d944a1b71c7f974f075321f025e3ce2b.png

Link to comment
  • Solution

To achieve Page Content Only, Exclude Footer, use this CSS code

/* Apply padding to all Line blocks */
#page article .sqs-block-horizontalrule {
    padding-top: 10px !important; 
    padding-bottom: 10px !important; 
}

 

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.