I have built a simple webpage using Twitter Bootstrap, and I have 2 problems:
- Although I have given the navbar a class of
navbar-inverse
, it just appears as a white rectangle and looks no different to the rest of the webpage. Divs with a class ofnavbar-inverse
are supposed to have inverse colours: a darkbackground-color
, and light text. - I have three links with an empty
href
, but they don’t appear. They still don’t appear if I give them ahref
of#
.
Here is a link to the result I am getting: http://jsbin.com/poqofapiqa/edit?html,output
2
Answers
Navbars:
Use the navbar-dark and bg-dark classes instead:
<nav class="navbar navbar-dark bg-dark"><!-- Navbar content --></nav>
Links:
Use at least
<a href="#">...</a>
, not blankhref
attribute.Anchors with blank attributes interpreted as usual (non-link) elements
You are using it in a wrong way. Class
nav-collapse
is used to display mobile menu button. The content available innav-collapse
will not be shown on webpage.You can use this code for your menu.