How do I code in CSS a <h1>, Navbar, and a <p>

Hello everyone,
I’m asking for your help to code this in CSS. I’m really struggling with it.
Currently I’m using flexbox but the text (p) goes with it which is not needed. I’m having difficulties coding on know to place the text below the header. please help

here is the html code

    <header>
        <h1>A VERY LONG HEADER</h1> 
        <p>A SHORT TEXT</p>
        <nav>
            <ul class="menu">
                <li><a href="#">Home</a></li>
                <li><a href="#">About</a></li>
            </ul>
        </nav> 

here is the css code

header {
display: flex;
}

.menu {
display: flex;
}

1 Like

HI @orangecute !
Can you provide the code you wrote?

1 Like

Hi, I updated my post to include the html and css code

Is that the whole complete code?

1 Like

yes. that’s the only part i’m struggling which is the header. I just want to know how to place the “A short text” to be below the header while still maintaining the nav bar

I edited your code using Codepen. I will attach the link here, if that’s what you want, let me know, otherwise, let me know.

1 Like

this is exactly what I need. I tried it on my own code and it now works. thank you so much!! I just needed the header and text to be wrapped in a div.

Keep up the good work bruv.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.