Questions tagged [nav]

The `

The <nav> tag is new HTML5 tag which defines a section of navigation links.

<nav>
   <ul>
      <li><a href="/html/">HTML</a></li>
      <li><a href="/css/">CSS</a></li>
      <li><a href="/js/">JavaScript</a></li>
      <li><a href="/jquery/">jQuery</a></li>
   </ul>
</nav>

In the HTML5 specification its primary use case is defined as follows:

The element is primarily intended for sections that consist of major navigation blocks. In particular, it is common for footers to have a short list of links to various pages of a site, such as the terms of service, the home page, and a copyright page. The footer element alone is sufficient for such cases; while a nav element can be used in such cases, it is usually unnecessary.

For more information on usage see HTML5 Doctor or the w3.org HTML reference.

2532 questions
16
votes
7 answers

How to center a navigation bar with CSS or HTML?

I am having difficulty with centering the navigation bar on this page. I tried nav { margin: 0 auto; } and a bunch of other ways, but I still can't center it.
tokyowp
  • 423
  • 3
  • 10
  • 18
14
votes
3 answers

When click on second dropdown black box should remain visible

In this dropdown nav I'm building if a dropdown is opened and you click to open a second one, the black box should remain visible. At the moment the black box disappears when you click on a second dropdown and reappears after the dropdown is…
Nesta
  • 988
  • 2
  • 16
  • 44
13
votes
2 answers

Bootstrap navbar overlapping body content

I am having some issues with my Bootstrap navbar. I have a lot of tabs in the navbar so the header gets on separate line and the tabs get on 2nd line which doesn't look good. because navbar takes 2 line so it hides some content on my page, for…
Muhammad Touseef
  • 4,357
  • 4
  • 31
  • 75
13
votes
1 answer

yii2 nav widget submenu class

I am using the adminLTE theme for bootstrap and it uses treeview-menu class in order to operate the submenu. ['class' => 'sidebar-menu treeview'], 'items' => [ ['label' => 'Menu…
nicky
  • 787
  • 2
  • 12
  • 27
12
votes
5 answers

Button to Trigger Nav-Tab with Twitter Bootstrap

This button triggers the next tab to load content, but the tab itself does not switch, it remains on the first tab..
Review
Here is the code for nav nav-tabs:
12
votes
4 answers

Sticky nav bar is flickering when reaching bottom of page

I recently go my nav bar to act as a sticky nav bar that adheres to the top of my page after I scroll down to a certain point, however, when I reach the bottom of my page the entire nav bar flickers, and even disappears sometimes. Think of it as an…
Brian
  • 2,687
  • 9
  • 37
  • 39
11
votes
2 answers

HTML5 sub nav semantics

A quick question re: HTML5 nav, specifically that of sub navigation (from a semantic point of view). I have
Adi
  • 4,034
  • 13
  • 56
  • 78
10
votes
4 answers

Bootstrap - Change breakpoint navbar?

This question was already asked here but this don't work because of the Javascript. So in the provided answer only the CSS was changed but not the JS, which means the content of the nav bar is still visible while the toggler is not. Any…
Piet
  • 2,188
  • 5
  • 19
  • 30
10
votes
2 answers

Can I have a logo image inside a nav element?

In the interest of writing semantic and solid markup, can I position a logo image inside a nav element? Right before the ul element. Or should I wrap it all…
thomasmyrman
  • 195
  • 2
  • 2
  • 8
9
votes
1 answer

Semantic use of

The W3C definition seems a bit vague when it comes to the
saneshark
  • 1,243
  • 13
  • 25
9
votes
4 answers

How do I center the Zurb Foundation top bar nav?

The top bar nav on my site is left aligned like this: | Home | aveoTSD | Silent Nite | I would like to center the top bar nav like this: | Home | aveoTSD | Silent Nite | Center it exactly like the red bar with "Example"…
user2343800
  • 133
  • 1
  • 4
  • 16
9
votes
3 answers

How to get Bootstrap's affixed navlist style?

I've been playing around with Bootstrap for sometime. While I've always been able to get everything working. I've been considering it for an upcoming project which requires an affixed side-nav exactly like the one present in the Twitter Bootstrap…
Ameen
  • 308
  • 1
  • 3
  • 11
8
votes
4 answers

Links inside HTML5 footer element (nav and aside?)

I'm currently moving a page from HTML4 to HTML5, and I have kind of an issue. There's a bunch of lists with links inside the footer. Most of them link to information (faq etc.) about the site itself. So I think it's OK to put those inside a nav…
north
  • 605
  • 7
  • 22
8
votes
2 answers

How to add a shadow under a navbar using CSS?

I'm an absolute beginner when it comes to HTML & CSS> So, I reckon that this might sound easy to some of you. I was looking for a way to add a simple shadow to the navbar, like the one on Codecademy's web to my pre-existing navbar. I'm including the…
CodingNoob
  • 95
  • 1
  • 1
  • 8
8
votes
7 answers

How to align navbar to center with css

I need help to align my navbar bar to center Here is my code What's wrong with it? It does not align the menu to the center. #nav { position: absolute; left: 0px; height: 40px; background-color: #2C64B4; width: 100%; margin: 0…
jas jashim
  • 186
  • 1
  • 1
  • 8