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 8404017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:29:17+00:00 2026-06-09T22:29:17+00:00

I’ve been trying to figure out how to make a custom shape in CSS

  • 0

I’ve been trying to figure out how to make a custom shape in CSS that visually will look like this:

shape with cut out edges and border

With the property of background:rgba(44, 44, 48, 0.9) and border:6px solid rgba(29, 30, 35, 0.9);

My problem is that I cannot find a way to make the top-right and bottom-left border look like the image I provided. Tried the tips on CSS Custom Shape on CSS-Tricks but it doesn’t seem to solve the problem as it cannot have background. Any ideas?

  • 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-06-09T22:29:18+00:00Added an answer on June 9, 2026 at 10:29 pm

    Unfortunately you cannot have a pseudo-element added to a pseudo-element (i.e. :after:after{} will not work) – with a complex shape like yours, you might have to cheat a little and rely on pseudo-elements of its children.

    <div class="fancy-box">
        <h2>Title</h2>
        <p>Content</p>
    </div>
    
    .fancy-box{/*container, top+bottom borders*/}
    .fancy-box:before{/*left-top "square" corner*/}
    .fancy-box:after{/*right-bottom "square" corner*/}
    .fancy-box>p:before{/*left-bottom "dog ear" border*/}
    .fancy-box>p:after{/*right-top "dog ear" border*/}
    .fancy-box>h2:before{{/*left-bottom "dog ear" background*/}
    .fancy-box>h2:after{/*right-top "dog ear" background*/}
    

    Again, this fiddle shows you how it would work with solid colors (reasonably well, although I don’t like the “thinner” angles) – but this would fail when you apply opacity. Your best would probably be around having “dog ears” made into pre-rendered semitransparent PNGs, for extra credit you could base64-encode them.

    The “solution” above is a complete semantic horror though – you may have better luck using multiple backgrounds with pre-rendered graphics.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I have some data like this: 1 2 3 4 5 9 2 6

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.