I am currently utilizing flexbox and facing an issue with aligning the text 'healthy meals' with food delivery as they are in two separate divs. I aim to achieve a layout similar to this.
https://i.sstatic.net/g0a80.jpg
My current setup looks like this:
https://i.sstatic.net/2H5gk.png
Therefore, my assumption is that I need to extend the text into the next div. Can anyone guide me on how to accomplish this?
Below is my code snippet:
.mainheader {
display: flex;
justify-content: space-around;
border: 2px solid green;
width: 100%;
background-image: url(./img/hero.jpg);
height: 100vh;
}
.menu {
display: inline-flex;
border: 1px solid red;
width: 70%;
justify-content: space-around;
margin-top: 25px;
}
.mainheader>div:first-child {
border: 1px solid red;
width: 40%;
margin-left: 50px;
align-items: flex-start;
justify-content: flex-start;
display: flex;
flex-direction: column;
}
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="vendors/css/normalize.css">
<link rel="stylesheet" type="text/css" href="resources/css/style.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>omnifoods</title>
</head>
<body>
<div class="mainheader">
<div class="slogan">
<h1>GoodBye Junk Food. <br> Hello Super Healthy Meals.</h1>
<div class="butt">
<button style="margin-right: 20px;">I'm hungry</button>
<button>Show me more</button>
</div>
</div>
<div class="menu">
<div>Food Delivery</div>
<div>How it works</div>
<div>Our cities</div>
<div>Sign up</div>
</div>
</div>
</body>
</html>