I am trying to make two elements as a display inline block element inside the flex container. But it is not working. Following is my html code
<div id="main-container">
<div id="col1">
first
</div>
<div id="col2">
second
</div>
<div id="col3">
third
</div>
<div id="col4">
fourth
</div>
</div>
and my css is
#main-container {
display: flex;
flex-direction: column;
align-items: flex-start;
padding: 8px 24px;
}
#col1 {
background: blue;
display: flex;
align-items: center;
overflow: hidden;
word-wrap: break-word;
min-height: inherit;
}
#col2 {
background: yellow;
align-items: center;
overflow: hidden;
word-wrap: break-word;
min-height: inherit;
display:inline-block;
}
#col3 {
background: green;
flex: 1;
display:inline-block;
min-height: inherit;
}
#col4 {
background: indigo;
flex: 1;
display: flex;
align-items: center;
overflow: hidden;
word-wrap: break-word;
min-height: inherit;
}
Here I am trying to make only col2 and col3 as a single row. How to make it.? Like below example
----
First
-------------
Second | thrid
--------------
fourth
-----
Actually I am trying with mat-table and I cannot able to add any div in between two cells. For the demo purpose I made this question with a div tag. I need to merge below red high lighted cells as a single row.
