Code can be added to a reply using three back tics ` before and after a code block.
If you cant find a back tic on your keyboard use ALT + 096 to display one.
I shared a link to a helpful article for each of your bullet points in order.
When solving problems, you can search the web to find helpful technical documentation, and/or prompt ChatGPT, Bard, or a trustworthy LLM (although you should be aware that an LLM may respond inaccurately).
You can keep your #nav-bar always at the top of the viewport by setting a certain CSS position property on it.
There is a position property that fixes an element in place.
You can find out about it at this W3Schools link CSS Layout - The position Property.
I suggest that you code with a mobile-first design approach, and use a media query to adapt your rendered code to larger screen sizes. You can learn how to use media queries at this Mozilla Developer Network link Using media queries - CSS: Cascading Style Sheets | MDN.
CSS Flexbox involves setting a display property to flex on a container, which then allows additional properties to be added to customize the flex effect. I often use flexbox to center my HTML elements. Just below, I wrote some HTML and CSS to show how flexbox could be used to center elements nested in a container.
HTML right below
<div class="container">
<p>
Some text in the first paragraph element.
</p>
<p>
Some text in the second paragraph element.
</p>
</div>