I have made a footer in Photoshop looking like this:
As you can see, the footer here is slightly arced all the way across. I have tried doing something with border-radius, but that almost only targets the edge, which makes the arc more curved in the edges, and not even receiving the effect of a subtle arced footer as seen in the image.
Is there an easy CSS way to do this, or do I need some JavaScript or something to achieve this?
5
Answers
Use a pseudo element of the footer with
border-radius
to make the arch.I made them different colors here so you can see which element is which.
Its not perfect, but here i’ve got a really really big circle that’s absolutely positioned with the overflow hidden so that you only see the top part of the arc.
https://jsfiddle.net/z9pq1026/
You can actually use border-radius to do this without a pseudo element.
will work just fine. Make sure that when you use:
the first property is always “50%” as this will ensure the arc meets in the middle. The second property (after the “/”) is the height of the arc measured from the middle to the edges
The circle solution, but it’s responsive!
This solution uses a large width to get a more pleasant curve, but without the pseudo-element: