Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Liutauras Vilda
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Devaka Cooray
Paul Clapham
Saloon Keepers:
Scott Selikoff
Tim Holloway
Piet Souris
Mikalai Zaikin
Frits Walraven
Bartenders:
Stephan van Hulst
Carey Brown
Forum:
HTML Pages with CSS and JavaScript
Bootstrap: how to make navbar <li> elements in same line?
Dumidu Udayanga
Greenhorn
Posts: 11
I like...
posted 7 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am trying to make navbar elements appear on same line. I tried overriding .nav class display to inline:block. but it is not working at all. Please help me fix this problem
HTML
<head> <title>Samrat Luitel website design </title> </head> <body> <!-- Navigation --> <nav class="navbar navbar-default navbar-fixed-top topnav"> <div class="container-fluid topnav"> <div class="navbar-header"> <a class="navbar-brand topnav" href="#" target="_blank">Samrat Luitel</a> </div> <ul class="nav navbar-nav navbar-right"> <li><a href="#home" style="color:black">Home</a></li> <li><a href="#home" style="color:black">Home</a></li> <li><a href="#home" style="color:black">Home</a></li> </ul> </div> </div> </div> </nav> </body>
CSS
body{ font-family:"Lato"; font-weight:700; } .navbar-brand{ color:black; }
.nav {
display: inline-block;
}
Mohamed Sanaulla
Bartender
Posts: 3225
34
I like...
posted 7 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Have you linked to the Bootstrap CSS? Bootstrap CSS should do it for you. Check
http://getbootstrap.com/docs/3.3/components/#navbar
bootstrap documentation
Mohamed Sanaulla |
My Blog
| Author of
Java 9 Cookbook
|
Java 11 Cookbook
Today's lesson is that you can't wear a jetpack AND a cape. I should have read this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Need ideas on what looks good?
re-use the same html code in every page
wide navigation bar causes problems
New to JSF, having trouble with JS in JSF
php mysql code not working on server
More...