Jump to content
Sign in to follow this  
JStahn

Bootstrap 4 Navbar

Recommended Posts

Wondering if there is a way to add a background image or texture to the NavBar with bootstrap? Something to make it pop more than just adding a color. Couldn’t find anything on this and most likely didn’t coin the search terms right but any suggestions are appreciated. 

Share this post


Link to post
Share on other sites

Hello @JStahn,there is no default class which will provide you to set image in background ,you can use bootstrap 4 class to create good looking navbar after that you can use custom css to override that particular class and apply background-img tag for your desire background image like this:

HTML:

<nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
      <a class="navbar-brand" href="#">WebSiteName</a>
    </div>
    <ul class="nav navbar-nav">
      <li class="active"><a href="#">Home</a></li>
      <li><a href="#">Services</a></li>
      <li><a href="#">Contact Us </a></li>
      <li><a href="#">About us</a></li>
    </ul>
  </div>
</nav>

css:

.navbar .navbar-default{

 background-image: url("Your Image path");

}

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...