Design Fixed Nav Bar: Steps & Tips to Create One

  • Thread starter Dave Ritche
  • Start date
In summary, the conversation was about designing a navigation bar that stays fixed at the top of the webpage when scrolled down. The suggestion was to use bootstrap.js, which has examples of a fixed nav bar. The person asking the question was wondering if it was possible to achieve this with just CSS and HTML, but it was recommended to use javascript. The tutorial and documentation for bootstrap were also mentioned as helpful resources.
  • #1
Dave Ritche
70
6
Hello everyone..
I was thinking about designing a navigation bar that would stay at the top of the body whenever the webpage is scrolled down.how can i do that?please help...
Thanks in advance..
 
Technology news on Phys.org
  • #2
Dave Ritche said:
Hello everyone..
I was thinking about designing a navigation bar that would stay at the top of the body whenever the webpage is scrolled down.how can i do that?please help...
Thanks in advance..
Have you looked at bootstrap.js? Take a look at the examples (http://getbootstrap.com/getting-started/#examples). They have a fixed nav bar example.
 
  • Like
Likes Dave Ritche
  • #3
Borg said:
Have you looked at bootstrap.js? Take a look at the examples (http://getbootstrap.com/getting-started/#examples). They have a static nav bar example.
Thanks but is it possible to do it only with Css and HTML?
 
  • #4
Dave Ritche said:
Thanks but is it possible to do it only with Css and HTML?
I haven't tried but I would think that you would need some javascript to get it to stay in place. If you haven't worked with javascript, the examples are mostly cut and paste.
 
  • #5
Thanks...i would try'em..
 
  • Like
Likes Borg
  • #6
Dave Ritche said:
Thanks...i would try'em..
Good luck. I've been working with the library and it's not too difficult. It's a good library to easily build pages that look the same across multiple browsers without having to code it yourself. The tutorials that I've seen are pretty good also.
 
  • #7
Thanks.
Can you tell me more about library and it's tutorials?
 
  • #8
Dave Ritche said:
Thanks.
Can you tell me more about library and it's tutorials?
I watched this tutorial and found it very helpful. As you watch the tutorial, he references the getbootstrap.com page and how to work with the docs and examples. By the end, you should be feeling like a whole world has opened in front of you. :smile:

 
  • #9
Thanks..
 

Related to Design Fixed Nav Bar: Steps & Tips to Create One

1. What is a fixed navigation bar?

A fixed navigation bar, also known as a sticky or persistent navigation bar, is a website element that remains visible and in its original position as the user scrolls down the page. This allows easy access to important links and menus without the need to scroll back to the top of the page.

2. Why should I use a fixed navigation bar?

A fixed navigation bar can improve the user experience by providing easy access to important links and menus at all times. It also saves users from having to scroll back to the top of the page, making navigation more efficient. Additionally, it can make a website look more modern and professional.

3. How do I create a fixed navigation bar?

Creating a fixed navigation bar requires basic knowledge of HTML, CSS, and JavaScript. The first step is to create the HTML structure for the navigation bar. Then, use CSS to style it and make it fixed by setting the position property to fixed. Finally, use JavaScript to handle any necessary functionality, such as adding or removing classes for different screen sizes.

4. What are some tips for creating a fixed navigation bar?

When creating a fixed navigation bar, it is important to consider the overall design and layout of the website. The navigation bar should be visually appealing and easy to use. It is also important to test the navigation bar on different devices and screen sizes to ensure it works properly. Additionally, make sure to keep the navigation bar simple and avoid overcrowding it with too many links.

5. Can I make my existing navigation bar fixed?

Yes, it is possible to make an existing navigation bar fixed by adding a few lines of CSS and JavaScript code. However, depending on the complexity of the navigation bar and the website's design, it may require more extensive modifications. It is recommended to create a separate fixed navigation bar rather than trying to modify an existing one.

Similar threads

  • Programming and Computer Science
Replies
19
Views
2K
  • Computing and Technology
Replies
4
Views
1K
  • Programming and Computer Science
Replies
4
Views
792
  • Programming and Computer Science
Replies
4
Views
1K
  • STEM Academic Advising
Replies
1
Views
698
  • DIY Projects
Replies
23
Views
3K
  • Introductory Physics Homework Help
Replies
7
Views
1K
  • Materials and Chemical Engineering
Replies
1
Views
1K
  • New Member Introductions
Replies
2
Views
232
Replies
1
Views
1K
Back
Top