Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6148479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:17:20+00:00 2026-05-23T19:17:20+00:00

Can I make a div with a custom shape? I mean, I have a

  • 0

Can I make a div with a custom shape? I mean, I have a rectangular div by default, and a few shapes can be obtained by exploiting the border-radius property of the div, but what I am looking for is a semi-leaf shaped element, something like this:

enter image description here

The picture isn’t all that great, but that’s what I am looking for. The elements in the div should be placed in this shape. How do I attain such functionality?

I am not just looking for just a shape, but an element which is shaped this way which could hold more elements.

The major issue I am facing if I use border-radius as the solution is that, I have floated images inside this div, now if I use border-radius, it is either clipped as in Firefox or overflows out of its border as in WebKit browsers. How do I get this content to strictly be inside the shaped div?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:17:22+00:00Added an answer on May 23, 2026 at 7:17 pm

    Regarding the shape of the div, you can achieve that by tweaking the radii of the border angles using the CSS border-radius property:

    width:25px;
    height:200px;
    background-color:#333;
    border-top-left-radius:50px 200px;
    border-bottom-left-radius:50px 200px;
    -moz-border-radius-topleft:50px 200px;
    -moz-border-radius-bottomleft:50px 200px;
    

    Easy working solid div demo: http://jsfiddle.net/AlienWebguy/83scc/1/

    Doing it with just a border on a single div will NOT render well on a Mac – for example, if you just have a white background and a black border, the border will “cut out” and then “re-appear” due to the poor calculations of the Bézier curves and fill-ins. With just a background color (in the demo) it looks great. You could easily double up your divs, one white, and one 1 pixel larger black which sits underneath it, like so:

    Working outline example: http://jsfiddle.net/AlienWebguy/83scc/3/

    As far as the contents of the div, they won’t naturally be positioned in such a way to compliment this shape, so you’ll need to give them absolute positioning and give the parent an overflow:hidden; property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I make a div element move up and down the page when
Can anyone tell me how to make a div's background transparent, but with a
How can i make the inner table to overlap the parent div with 5
The following div's are displayed onclick. How can I make it display a different
Can someone tell me how I can make the following output? I have a
How can I using jQuery make the image inside of a div change to
I am customizing wordpress blog and I have a need to make custom sidebar
I'm trying to make a custom jQuery toggle function. Right now, I have 2
I have four divs with custom Attributes like: <div marker=A>A1</div> <div marker=A>A2</div> <div marker=B>A3</div>
I can make a DAO recordset in VB6/Access do anything - add data, clean

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.