This is my HTML Code in which I have one header and inside that, I have two divs, which I want to align one in the center and one in right
<Header class="header">
<h1>This is a heading</h1>
<div>this is my div</div>
</Header>
I Tried this solution in css i'm trying to wrap the header in flex box so that both item can place side by side
using sass
.header {
display: flex;
justify-content: center;
div {
justify-self: right;
}
}
Example with SaSS converted to CSS
.header {
display: flex;
justify-content: center;
}
.header div {
justify-self: right;
}
div { border: 1px solid black; }
<Header class="header">
<h1>This is a heading</h1>
<div>this is my div</div>
</Header>