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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:58:02+00:00 2026-06-03T15:58:02+00:00

I want to create two divs which are floated left to each other, however

  • 0

I want to create two divs which are floated left to each other, however with a slanted angled border separating them. I’ve attached a picture to demonstrate what I mean.

Does anyone know if something like this is possible with CSS (cutting off the content with an overflow:hidden I guess)

adjacent div with slanted side

These divs need to contain images that get cut off by the border, here is an example :

divs with images and slanted adjacent sides

  • 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-03T15:58:04+00:00Added an answer on June 3, 2026 at 3:58 pm

    Try this

    .left, .right {
      position: relative;
      height: 100px;
      width: 200px;
      background: #000;
      float: left;
    }
    
    .left:after {
      content: '';
      line-height: 0;
      font-size: 0;
      width: 0;
      height: 0;
      border-top: 100px solid #000;
      border-bottom: 50px solid transparent;
      border-left: 0px solid transparent;
      border-right: 50px solid transparent;
      position: absolute;
      top: 0;
      right: -50px;
    }
    
    .right {
      margin-left: 60px;
      width: 100px;
    }
    
    .right:before {
      content: '';
      line-height: 0;
      font-size: 0;
      width: 0;
      height: 0;
      border-top: 50px solid transparent;
      border-bottom: 100px solid #000;
      border-left: 50px solid transparent;
      border-right: 0px solid #000;
      position: absolute;
      top: -50px;
      left: -50px;
    }
    <div class="left"> </div>
    <div class="right"> </div>

    UPDATE with images

    .left, .right {
        background: #000 url('http://lorempixel.com/300/100');
        position: relative;
        height: 100px;
        width: 250px;
        float: left;
    }
    
    .left:after {
        content: '';
        line-height: 0;
        font-size: 0;
        width: 0;
        height: 0;
        border-top: 50px solid transparent;
        border-bottom: 100px solid #fff;
        border-left: 30px solid transparent;
        border-right: 0 solid #fff;
        position: absolute;
        top: -50px;
        right: 0;
    }
    
    .right {
        background: #000 url('http://lorempixel.com/200/100');
        width: 150px;
    }
    
    .right:before {
        content: '';
        line-height: 0;
        font-size: 0;
        width: 0;
        height: 0;
        border-top: 100px solid #fff;
        border-bottom: 50px solid transparent;
        border-left: 0px solid transparent;
        border-right: 30px solid transparent;
        position: absolute;
        top: 0;
        left: 0;
    }
    <div class="left"> </div>
    <div class="right"> </div>
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create my own component which consists two other panels. One of
I want to create two types of custom objects. Each has a property which
i am preparing my android apps in which i want to create two row
I want to create a two-dimensional array in which I want to store records
I want to create an array which has two columns. The output should contain
I have created a splash screen in which i want to create two buttons
Iterating over 'posts' I want to create a row div which will contain two
I want to create some html. In a div, which has a grey border,
I want to create two vertical divs using HTML5, CSS3 and JQuery. One Div
I want a layout with two right-aligned columns. So, I create the three divs

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.