skip to Main Content

I am trying to make a wavy border for a div like the image I attached enter image description here

I have tried to slice it and put it as an image background

  #section-2{
      background-image: url(../images/section-2bg.png);
      background-repeat: no-repeat;
      /* Full height */
      height: 100%;
      /* Center and scale the image nicely */
      background-position: center;
      background-repeat: no-repeat;
      background-size: cover;
    }

and this is the HTML

  <section id="section-2" class="section-prod-comparison">
            <div class="row">
                <div class="col-lg-6">
                 <div class="col-lg-6"></div>
                </div>
            </div>
  </section>

but the image did not fit the screen and I could not customize it to follow the design
here is the result
enter image description here

is there any way to make it using CSS ??
or I only have to use the image as a background , so how to make the image background just like the design and responsive as well

thank you

2

Answers


  1. Put SVG (which has these path and shapes) inside a div container. You can use this site to generate wave svg or just make/find other.

    Login or Signup to reply.
  2. Try using this style in your container.

    --background: url('./background.png') no-repeat top center / cover;
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search