0
votes

I am working on this Drupal site for a friend of mine: http://todatoda.com

I am using the Bootstrap theme in order to achieve maximum responsiveness and I am getting there. Problem is the secondary menu (User Menu) is always showing as a button on small screens, eventhough it has been completely disabled on the configuration and its links are also disabled on admin>structure>menus.

On big screens (desktop and tablets) all works fine. On smartphones, however, this is what I see:

notice the button
(source: brodtec.com)

The button, of course, does nothing when clicked. So it just stays there to annoy me.

I even tried to set display:none for all css related to this funky button, without success:

/* Disable funky navbar button - still not working * /
.navbar-default .navbar-toggle {
border-color: #ddd;
display: none;
}
.navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus {
background-color: #ddd;
display: none;
}
.navbar-default .navbar-nav>li>a {
color: #777;
display: none;
}
.navbar-nav>li>a {
padding-top: 15px;
padding-bottom: 15px;
display: none;
}
.navbar-toggle {
position: relative;
float: right;
padding: 9px 10px;
margin-top: 8px;
margin-right: 15px;
margin-bottom: 8px;
background-color: transparent;
border: 1px solid transparent;
border-radius: 4px;
display: none;
}
input, button, select, textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
display: none;
}
button, html input[type="button"], input[type="reset"], input[type="submit"] {
cursor: pointer;
-webkit-appearance: button;
display: none;
}
button, input {
line-height: normal;
display: none;
}
icon-bar {
display: none;
}
element.style {
display: none;
}

All help is welcome!

Thanks!

2

2 Answers

0
votes

If you want to delete the button using only CSS, you can do it:

header .navbar-toggle {
  display: none !important;
}

Or simply:

.navbar-toggle {
  display: none !important;
}

To delete all toggle menus. I don't use bootstrap, but the best option is to delete the menu via edit page.tpl.php or the theme configuration.

Regards.

0
votes

I had to use page.tpl.php as I could not find a way to acomplish what I wanted just by tweaking the css file. So, here are the steps:

  1. Copy the page.tpl.php file into your own theme folder. In my case, it ended up at /var/www/sites/todatoda/theme/system/page.tpl.php

  2. Find this portion of code and comment ad the invisible div:

      <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
      <div style = "visibility:hidden">
        <button type="button" class="navbar-toggle" 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>
      </div>
    </div>
    
  3. Just in case, also comment the place where the secondary menu gets rendered:

         <?php if (!empty($secondary_nav)): ?>
    

    -->

  4. Save the file and clear the caches (drush cc all)

Done!