Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1675

why my display: flex wont work.. (HTML CSS problem)

$
0
0

Click here to see the previewenter image description here

The "title" is rendered a little too high. As you can see in the code, I was using flex on titnav and mainnav, yet they won't align the same row.

I expect them to be in the same row.

/* NAV */nav{    position: sticky;     top: 0;    backdrop-filter: blur(45px);    font-size: 20px;}nav ul{    list-style-type: none;    padding: 0px;    margin: 0px;    overflow: hidden;    color: white;    font-family: Cascadia Code;}nav a{    padding: 15px;    text-align: center;    text-decoration: none;}.titnav{    display: flex;    justify-content: flex-start;}.mainnav{    display: flex;    justify-content: flex-end;}
<nav><div class = "navBar"><ul><div class = titnav><!-- Tittle ( masuk dalam nav )--><li><a href="">PortoHub</a></li></div><div class = mainnav><!-- ini Navnya doang --><li><a href="">About</a></li><li><a href="">Experience</a></li><li><a href="">Project</a></li><li><a href="">Contact</a></li></div></ul></div></nav>

Viewing all articles
Browse latest Browse all 1675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>