How to make a navbar that works on all screen sizes?

255 views Asked by At

Trying to just create a website with only knowledge of HTML/CSS and JavaScript for now (tired of learning, wanted to do something), but with the navbar I am having trouble with keeping the navbar spaced out correctly on all screen types.

For example, if my Firefox browser is full screen then it works find, but if I snap it to half screen then the navigation text (Home, About, etc) all start stacking onto each other.

Didn't really know specifically what I was asking for, so Googling was not working.

Any help, or more specifically any tutorials or topics about this to look into? I saw a lot of jQuery and Bootstraps when trying to Google more about it, but I don't really know those yet.

1

There are 1 answers

0
Kevin On

Look in to bootstrap, that can help you as it provides a frame-work of CSS for you to work with, including responsive navbars.

or try

.cssclassname {
width: 100%;
}

That would set the width to 100% screen size.