Can any one help me how can I accomplished this using CSS? I’ve tried the css below and I think I missing something can anyone teach me how to do it?
Please see image below
HTML
<div class="nwdev">
<div class="dev1 dev11"></div>
<div class="dev1 dev111"></div>
</div>
CSS
.nwdev {
height: 100vh;
position: relative;
overflow: hidden;
display: flex;
flex-direction: column;
background-color: #fff5ea;
flex-direction: row;
}
.dev1.dev111 {
background: red;
border-radius: 80px 0px 0px 0px;
}
.dev1.dev11 {
background: yellow;
border-radius: 0px 0px 80px 0px;
}
2
Answers
You are quite close. Just give
.dev11
and.dev111
awidth
of 50% and uselinear-gradient
as background for.nwdev
:You can try the following code:
In your html add a new div inside the element on the right side:
First of all you need to add a width to your elements, because they are flex items you can use
flex-basis: 50%;
which is equivalent towidth
in this case, but it’s more responsive in some situations.Then, remove border radius from
.dev111
and add border radius to.inside
:Note also that I changed the selectors
.dev1.dev11
to.dev11
and.dev1.dev111
to.dev111
because you don’t need to be as specific.While it is not exacly like your picture it should be enough to get you started.