I have three different React components in the following format:
<Container className={"parent"}>
<h2>Heading</h2>
<Tabs className={"childOne"}/>
<Info className={"childTwo"}/>
</Container>
Each of the above child components render other child components and native html tags like <div>s and <span>s.
This is how I want the components to render on the browser:
I have tried achieving this using CSS flex-box. However, the child components only take up the width of their content and I am not able to proportion their widths into 66% and 33% of the container respectively (with some gap in between). This is the CSS I tried:
.parent {
display: flex;
flex-direction: row;
}
.childOne {
flex-basis: 70%;
}
.childTwo {
flex-basis: 30%;
}
I also tried display: inline-block; and float:left on each of the child components but this did not even align the children horizontally.
Could someone please show me how I can achieve this? Thanks!
