Jump to content

How do you apply a background image, below a Curved Ellipse Bottom?


simona6

Recommended Posts

.curved-bottom {
    clip-path: ellipse(100% 60% at 50% 40%);
    background-color: #000000!important;
}

I'm trying to add a background colour behind the Row that has this clip path base.

So that it isn't just white.

Then I'd like to make it black, and it blend in with the next row.

Is there a simple fix to make it a colour, after the curve?

Link to comment
Share on other sites

Is this the effect you are looking for?

image.png.d1ebab223f6bc422cb5c53213bd0cd83.png

<head>
    <style type='text/css'>
        .curved-bottom {
            clip-path: ellipse(100% 60% at 50% 40%);
            background-color: #FFFF00;
            color: black;
        }
        .w3-row {
            background-color: black;
            color: white;
        }
        .w3-col {
            padding: 50px 0;
            text-align: center;
        }
    </style>
</head>
<body>
    <div class='w3-row'>
        <div class='w3-col m12 curved-bottom'>
            I have a curvy bottom
        </div>
    </div>
    <div class='w3-row'>
        <div class='w3-col m12'>
            I'm a straight guy
        </div>
    </div>
</body>

 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

https://www.79design.org.uk/contact-us-2/

This is a duplicate of the page.

Inspect it and you see the grve-section has a white background, but I can't override that, as it will affect all sections down the page.

I did try it with the additional 'curved-bottom' in the class in CSS, but that didn't work.

Any help would be terrific.  And some many problems!

Link to comment
Share on other sites

3 hours ago, simona6 said:

Inspect it and you see the grve-section has a white background, but I can't override that, as it will affect all sections down the page.

The white under the curve is coming from the background set by #grve-content rather than the .grve-section class, so changing it wouldn't help.  Whatever background the section would have gets clipped away by the .curved-bottom class, so the background you are seeing has to come from some parent element.

If you only need the change for this page, set a rule that is limited to just it:

#page-35941 {
	background-color: #dadada;
}

If you need it for several pages, create a new class you can apply to the page wrapper div.

Link to comment
Share on other sites

Mmmmm so what if you want the other rows to be black or plain white?  You then have to set each row's background.
I assumed you could set the background of the container as grey.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.