Jump to content

Custom section divider full width

Recommended Posts

Site URL: https://www.creativeportrait.net.au/

Hi Squarespace expert,

 

I'm trying to set a css code to include a wave divider section but I can't get it to fit the full width of the page on a large screen.

 

I was wondering if there is anyone of you that would be able to help me out on this one.

 

Here my actual css:

 

section[data-section-id="6046ec7a7b10a14f1cc25480"],
{
  .section-background {
  overflow: visible;
  &:before {
    content: '';
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: inherit;
  -webkit-mask: url(https://static1.squarespace.com/static/5fa4daea45d5e37ac8050c94/t/60b87b7f0e44b70db4f4caa5/1622702975808/wave.png) bottom no-repeat;
    mask: url(https://static1.squarespace.com/static/5fa4daea45d5e37ac8050c94/t/60b87b7f0e44b70db4f4caa5/1622702975808/wave.png) bottom repeat;
    margin-top: 1px;
    transform: translateY(-100%);
    position: absolute;
    pointer-events: none;

    @media screen and (max-width: 350px) {
      -webkit-mask-size: 300% 50%;
              mask-size: 300% 50%;
    }}}
}

 

Thanks in advance,

 

Jeremy1098750527_ScreenShot2021-06-03at.thumb.png.36f6c0d1c9ed6bbdd34ad2f60e99ceb2.png

Edited by Jeremyn
Link to comment

This works perfectly!! Thank you very much for this. I was trying things out for so long.

 

I have another quick question. I discover this website recently to create beautiful section divider  https://www.shapedivider.app/

I would love to integrate the html and ccs code provided to multiple section on my website in a simple way.

Would you know how to do this?

 

CSS:

.custom-shape-divider-top-1623329523 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.custom-shape-divider-top-1623329523 svg {
    position: relative;
    display: block;
    width: calc(144% + 1.3px);
    height: 239px;
}

.custom-shape-divider-top-1623329523 .shape-fill {
    fill: #FFFFFF;
}

 

 

HTML:

<div class="custom-shape-divider-top-1623329523">
    <svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none">
        <path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" class="shape-fill"></path>
        <path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" class="shape-fill"></path>
        <path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" class="shape-fill"></path>
    </svg>
</div>

Link to comment

I have now worked out after trying out but now I can't get an even space between the wave divider and the section itself.  So some text or button get cover by the svg on some sections.

 

// Wave section
section[data-section-id="60c0698a8d9e38432eaf5c02"],
section[data-section-id="60c0698a8d9e38432eaf5c08"],
{
 .section-background {
  overflow: visible;
  &:before {
    content: '';
    width: 100%;
    height: 10%;
    top: 0;
    left: 0;
    background: inherit;
  -webkit-mask: url(https://static1.squarespace.com/static/5fa4daea45d5e37ac8050c94/t/60c4c63b0db925732ea339bb/1623508539300/wavesNegative.svg) bottom no-repeat;
    mask: url(https://static1.squarespace.com/static/5fa4daea45d5e37ac8050c94/t/60c4c63b0db925732ea339bb/1623508539300/wavesNegative.svg) bottom repeat;
    margin-top: 1px;
    transform: translateY(-100%);
    position: absolute;
    pointer-events: none;

    @media screen and (max-width: 400px) {
      -webkit-mask-size: 120% 20%;
              mask-size: 120% 20%;
    }}}
}

Link to comment
  • 9 months later...
  • 1 month later...
On 3/25/2022 at 11:57 PM, tuanphan said:

If you share link to page where you have problem, we can take a look

I have the same problem. With the section width. I am using this code: Can you help me @tuanphanhttps://dinosaur-dodecahedron-9p5z.squarespace.com - PW: hello123 -  Thanks!

 

I Changed .section-background to & but doesn't work.

 

 

// Custom Section Divider (top) //
#siteWrapper section[data-section-id="6279632b3395720f8dca7f80"] {
  .section-background {
  overflow: visible;
  &:before {
    content: '';
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: inherit;
  -webkit-mask: url(https://static1.squarespace.com/static/627109a2d400dd23d4702296/t/62815f2142a6696b2e032730/1652645665091/Asset+2.svg) bottom no-repeat;
    mask: url(https://static1.squarespace.com/static/627109a2d400dd23d4702296/t/62815f2142a6696b2e032730/1652645665091/Asset+2.svg) bottom no-repeat;
    margin-top: 1px;
    transform: translateY(-100%);
    position: absolute;
    pointer-events: none;

    @media screen and (max-width: 800px) {
      -webkit-mask-size: 300% 50%;
              mask-size: 300% 50%;
    }}}
}

 

 

Screen Shot 2022-05-15 at 17.20.04.png

Edited by HunterD
Link to comment
9 hours ago, HunterD said:

I have the same problem. With the section width. I am using this code: Can you help me @tuanphanhttps://dinosaur-dodecahedron-9p5z.squarespace.com - PW: hello123 -  Thanks!

 

I Changed .section-background to & but doesn't work.

 

 

// Custom Section Divider (top) //
#siteWrapper section[data-section-id="6279632b3395720f8dca7f80"] {
  .section-background {
  overflow: visible;
  &:before {
    content: '';
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: inherit;
  -webkit-mask: url(https://static1.squarespace.com/static/627109a2d400dd23d4702296/t/62815f2142a6696b2e032730/1652645665091/Asset+2.svg) bottom no-repeat;
    mask: url(https://static1.squarespace.com/static/627109a2d400dd23d4702296/t/62815f2142a6696b2e032730/1652645665091/Asset+2.svg) bottom no-repeat;
    margin-top: 1px;
    transform: translateY(-100%);
    position: absolute;
    pointer-events: none;

    @media screen and (max-width: 800px) {
      -webkit-mask-size: 300% 50%;
              mask-size: 300% 50%;
    }}}
}

 

 

Screen Shot 2022-05-15 at 17.20.04.png

Which page are you referring to? I don't see it on homepage

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.