Solved

bootstrap navgrid css style

Posted on 2014-10-28
1
449 Views
Last Modified: 2014-11-04
I'm working on a menu toolbar using bootstrap 3.1.1
So i create an example.

This is the example for my code.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <title>Navbar Template for Bootstrap</title>

    <!-- Bootstrap core CSS -->
    <link href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet" />

    <style type="text/css">
        
        body {
            background-color: #c2d7ce;
        }

        /* the style for Page Title Text*/
        .PageTitle {
            color: white;
            font-size: 30px;
            font-family: Arial;
            font-weight: bold;
            margin-left: 15px;
            margin-top: 2px;
            width: auto;
        }

        /*********** Bootstrap Overrides ***********/
        .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
            color: #ff61fc  /*Sets the text hover color on navbar*/
        }
        .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active >   
        a:hover, .navbar-default .navbar-nav > .active > a:focus {
            color: white; /*BACKGROUND color for active*/
            background-color: #030033; 
        }

        .navbar-default {
            background-color: #0f006f;
            border-color: #030033;
        }
        .dropdown-menu > li > a:hover,
        .dropdown-menu > li > a:focus {
            color: #262626;
            text-decoration: none;
            background-color: #66CCFF;  /*change color of links in drop down here*/
        }
        
        .nav > li > a:hover,
        .nav > li > a:focus {
            text-decoration: none;
            background-color: silver; /*Change rollover cell color here*/
        }
        
        .navbar-default .navbar-nav > li > a {
            color: white; /*Change active text color here*/
        }
        
        /*********** Bootstrap Overrides ***********/
        
    </style>
    
</head>
<body>

    <div class="container">

      <!-- Static navbar -->
      <div class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
          <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
            <!--<a class="navbar-brand" href="#">Project name</a>-->
            <a href="http://www.bing.com"><img src="https://farm6.staticflickr.com/5604/15652632185_4453bd0e7a_o_d.png" /></a>
          </div>

          <div class="navbar-collapse collapse">
            
            <!-- ********  items on left side of toolbar  ******** -->
            <ul class="nav navbar-nav">
              <!--<li class="active"><a href="#">Link</a></li>-->
              <li class="PageTitle">Home Page</li>
              <!--<li><a href="#">Link</a></li>-->

            </ul>
            <!-- ********  items on left side of toolbar  ******** -->
            <!-- ********  items on right side of toolbar  ******** -->
            <ul class="nav navbar-nav navbar-right">
              <li><a href="./">Link 1</a></li>
              <li><a href="../navbar-static-top/">Link 2</a></li>
              <li><a href="../navbar-fixed-top/">Link 3</a></li>
            </ul>
            <!-- ********  items on right side of toolbar  ******** -->

          </div>
          <!--/.nav-collapse -->

        </div><!--/.container-fluid -->
      </div>

    </div> <!-- /container -->

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    
    <!--<script src="../../dist/js/bootstrap.min.js"></script>-->
    <script src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.1/js/bootstrap.min.js"></script>
 
</body>
</html>

Open in new window


When I run it, it looks like this video:  http://youtu.be/AsyXdfMa9wM

If you notice the toolbar background color is like a purpleish/blue color with this code #0f006f .
When I resize the browser window the bootstrap hamburger menu pops up on the toolbar.
Then if I click on the hamburger menu icon then the collapsible menu opens up and it has the same purpleish/blue background color as the header toolbar.

If you look at my code.. i'm setting the background color like this in my css.

        .navbar-default {
            background-color: #0f006f;
            border-color: #030033;
        }

But when I change it here seems it to apply it to both the header background and the collapsible menu background:

Right now when I click on the hamburger menu the collapsible menu that opens up looks like this:

my existing menu
Is there a way to revise it so the header toolbar is background-color: #0f006f; and the background of the collapsible toolbar is background-color: #c6c6c6;

So I want it to look like this:

my desired colors
Here is a fiddle of my current menu:

http://jsfiddle.net/3x7y563h/

Anyone know how I can change that collapsible menu color to #c6c6c6 so it looks like the picture above?
0
Comment
Question by:maqskywalker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40409512
.navbar-collapse.collapse {
    background:  #c6c6c6;
}

Open in new window

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
bootstrap wrap text 1 36
Table style position to the left 8 26
Hit counters in SharePoint 2013 2 30
Embedd an image or live dashboard into Slack 1 14
When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question