Navbar CSS Tutorial: 3 Ways to Create a Navigation Bar with Flexbox

Skillthrive · 2.9M views · 2019 · 15:08

Open on YouTube

Web developmenttutorial

Why Stack Overflow recommends it

Stack Overflow users link it when answering or asking about building navbars with Flexbox, including the order property for rearranging header elements.

Recommended by 2 people across 2 different months, 2020 to 2022.

What it is

A 15-minute project-based tutorial from the Skillthrive channel that builds three different navigation bar designs using HTML and CSS Flexbox. It shows how properties such as align-items, justify-content and order can be used to rearrange a navbar quickly.

What people said

Recommends EmielV · 2021-11 · Stack Overflow · on “How to force desktop view of a website onto a mobile device”

Asign your widths and heights as percentages for example width: 50% so that it will not have a fixed value. If you want a navbar, you would probably use flex-box. Here a good tutorial on that: [this video]

Recommends Fabricio B · 2022-02 · Stack Overflow · on “page does not scroll”

Here is the solution, you need to put that in the head, for the site adjust for mobile devices: <meta name="viewport" content="width=device-width, initial-scale=1.0"> Here: <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> If you want know more: Meta viewport - Mozilla [LINK] Also, i will recomend you make some changes on your code: 1 - Remove the heights 100vh and put a fix hight for you components, like 500px, 400px. Examples: height: 300px; ; 2 - Your code is like a puzzle, put a background-color in your body, not in the components, if you want that the

Cites Lauryn Atlanta · 2020-09 · Stack Overflow · on “Flex order for navigation bar incorrect”

I am trying to order my navigation bar so that the order is, nav, then button, then h1. I am following a tutorial here [this video] and it is the third option provided by the youtuber. The h1 should be pushed all the way to the right side. For some reason flex order will not work within the header and align it the correct way. This is what it should look like: [LINK] *{ box-sizing: border-box; padding:0; margin:0; } body{ background-color: rgb(54, 54, 54); font-family: sans-serif; color: white; } li, a, button{ font-weight: 500; font-size: 16px; font-family: sans-serif; color: rgb(255, 255, 255); text-decoration: none; } header{ display: flex; justify-content: space-between; align-items: center;