Zishan
Zishan

Reputation: 25

How to give custom shape border effect using css

enter image description here

Please have a look at the image. There is a black border in right side with text inside. How can I get this in css?

Upvotes: 0

Views: 540

Answers (2)

Mark Knol
Mark Knol

Reputation: 10163

I would say use svg for this, use svg as background of container div, give content lot of margin top/left/right to make it fit.

Btw this design is most likely not gonna work on mobile so you have to figure out a decent alternative for that.

Upvotes: 1

ScoobyDam
ScoobyDam

Reputation: 379

Here is a great website with weird CSS hard div: https://css-tricks.com/examples/ShapesOfCSS/

You'll see they did an egg, then you can modify the egg shape to try to get a similar shape like on the picture.

What you need to do is create a div with a class, then modify the div's shape and had a border on it.

Upvotes: 0

Related Questions