Meteor Js Boostrap Menu Formatting Challenges

Greetings and good afternoon. I am currently working on developing a social networking application using the Meteor Js Stack, but I am encountering some issues with my navigation bar wrapping on mobile devices. Despite setting my dropdown to pull-right, it still wraps when clicked.

html { -webkit-text-size-adjust: none; }

.navbar-nav {
    margin: 0;
    float: none;
    display: inline-block;
}
.navbar-nav>li {
    float: none;
    display: inline-block;
}
.navbar-nav>li>a {
    padding-top: 15px;
    padding-bottom: 15px;
}

.navbar-default{
    position: fixed;
    right: 0;
    left: 0;
    z-index: 1030;
    margin-bottom: 250px;
}

.row {
    margin-top:80px;
}

#submitPost {
    width: 500px;
}



@media screen and (max-width: 768px) {

    .row {
        margin-top: 135px;
    }


    #submitPost {
        width: 300px;
    }

}

<nav class="navbar navbar-default">
    <div class="container">
      <ul class="nav navbar-nav">
        <li>
          {{#linkTo route='root'}}
        <span style="font-size:1.7em" class="glyphicon glyphicon-home" aria-hidden="true"></span>
          {{/linkTo}}
        </li>
        <li>
          {{#linkTo route='messages'}}
        <span style="font-size:1.7em" class="glyphicon glyphicon-envelope" aria-hidden="true"></span>
          {{/linkTo}}
        </li>
         <li>
          {{#linkTo route='profile'}}
        <span style="font-size:1.7em" class="glyphicon glyphicon-user" aria-hidden="true"></span>
          {{/linkTo}}
          </li>
          <li class="dropdown">
              <a style="font-size:1.7em" class="glyphicon glyphicon-edit" href="#" data-toggle="dropdown" id="navLogin"></a>
              <div id="submitPost" class="dropdown-menu" style="padding:17px;">

              </div>
          </li>
      </ul>
      <ul style="font-size:1.7em" class="nav navbar-nav navbar-right">
       {{> loginButtons}}
      </ul>
    </div>
  </nav>
  <div class="container">
    <div class="row">
      <div class="col-lg-2"></div>
      <div class="col-lg-8">
        {{> yield}}
      </div>
      <div class="col-lg-2"></div>
    </div>
  </div>

Check out the screenshot below:

https://i.sstatic.net/5glx9.png

For additional screenshots, click here.

Answer №1

Feel free to draw inspiration or gain new insights from this illustration. You can enhance the visibility of your main links/icons on all screen sizes and utilize the toggle feature for your form and lower navigation section.

.navbar-default.custom-navbar {
  background: #38A6EB;
  border-radius: 0;
  border: none;
}
.custom-navbar ul.navbar-nav li.active > a {
  background: #007CC9;
  color: #fff;
}
.custom-navbar ul.navbar-nav > li > a:hover,
.custom-navbar ul.navbar-nav li.active > a:focus {
  background: #fff;
  color: #007CC9;
}
...
...
...
<strong>[Updated styling code]</strong>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<nav class="navbar navbar-default custom-navbar" role="navigation">
... 
...
... [Additional HTML Code]

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

"Exploring the process of utilizing AngularJS to open a .docx file in a new template

When attempting to open a .jpeg or .pdf file in a new template using an iframe, it was successful. However, the same approach failed when trying to open a .docx file. How can this issue be resolved? Angularjs code: $scope.openTemplate = function ($fpath ...

Hide the #loading element when the <input> field is devoid of content

Sample - jsfiddle.net/75CqW/ Upon clicking the Submit button, the loading div is displayed even when the input field is empty. I attempted to add "required" to the input field to prevent the loading div from showing when it's empty, but it's st ...

Passing image source from parent component to child component in Vue.js

I encountered an issue where I stored the image file name in a variable within the parent component and passed it to the child component using props. However, despite this setup, the child element is not displaying the image as expected. Here is the data ...

The Bootstrap 5 navigation bar does not extend to the full width of its parent

While working on a Bootstrap navigation inside a container, I encountered an issue where the navigation bar was not expanding to match the width of the container. It seemed like the padding had to be manually adjusted to fit properly. Below is the code sn ...

Overflow scroll block containing a table within a div element

I am working on displaying a loop of records fetched from the database. I want to place these records inside a div block with overflow so that users can scroll through a long list easily. However, when I try to implement the below code, the appearance of t ...

JavaScript can retrieve the default page name that is hidden within the browser's URL

When a URL is entered without a specific file name at the end, such as "www.google.com," the server typically serves a default file like "index.html" or "default.aspx." In this scenario, if the browser displays "www.google.com," I am looking to extract the ...

Terminate a browser tab with the click of an HTML button

I'm facing an issue with my HTML button - I need it to close the tab upon clicking. Unfortunately, the common methods seem to no longer work on newer versions of Chrome and Firefox. I've tried using these two solutions but they did not work: & ...

Send information from a web page's elements to PHP with the help of AJAX

My goal is to integrate AJAX, HTML, and PHP to create a seamless user experience. I am currently facing difficulty in passing variables to the PHP form. The method I've employed seems a bit complex, especially since this is my first attempt at using A ...

Avoid displaying the identical div through consecutive random fade-ins and fade-outs

I'm trying to make a JavaScript function that selects a random div from a list of divs, displays it for a few seconds, fades it out, and repeats this process in a loop. The issue I'm facing is that sometimes the same div is selected consecutively ...

Tips for achieving consistent text and image alignment through CSS styling

My table currently contains a default profile image. Initially, there might not be any text content and I have set up the CSS styling to allow text to wrap around the default image. I am facing an issue when trying to position the image statically in a wa ...

What steps should I take to design and implement this basic search form?

Essentially, I have a three-page setup: - One page containing all possible search results such as: 'search result 1' 'search result 2' 'search result 3' - Another page with a search form and enter button. - And finally, a res ...

Discovering the position of elements in relation to their (grand^N)parent

Among my possessions are elements A and B. B has the ability to exist as a direct child of A, or there may be anywhere from 0 to N elements separating them. It is imperative that I determine how B is situated in relation to A, specifically noting the dist ...

Python: Change text within HTML content rather than the HTML tags

Looking for help with converting HTML code? <pre class="script">template("main/GlobalShared");</pre> <pre class="script"> var link = '/Draft/Tracker_1.1'; if (wiki.pageexists(link)) { &lt;div class="version"&gt; web ...

Building a row of five dynamic columns using Bootstrap's responsive design

I'm looking to set up a row with 5 responsive columns that have equal padding on all sides, but I'm struggling to find the best way to do this using Bootstrap. Here's my current HTML: <div class="row five-col-row"> < ...

JQuery tips and tricks: How to create a hover effect for an image positioned behind

Is there a way to achieve hover on an element that is positioned behind another? I am working with two images and have come across others with the same issue. However, the solutions they found were just workarounds rather than true solutions to achieving a ...

Troubleshooting: Issue with Jquery functionality when selecting an item from dropdown menu

I've been trying to dynamically select an item from a dropdown menu, but for some reason it's not working even though I've followed the suggestions on this forum. Here is my HTML: <div> <div class="form-group"> <la ...

What is the best way to choose a particular user from the database and display only their information?

I am looking to create a table that displays user data from my database. In essence, I have set up an auto-increment "ID" field in my users' table and now I want to include a multiple-choice box where all the users in the database are listed. These u ...

instructions on implementing Arial Black font style in LESS

Using less-1.7.0.min.js, I encountered an issue when setting Arial Black as the font. @fontFamily: Arial Black,Arial Black,Gadget,sans-serif; Upon generating the CSS, it resulted in: p, span { font-size: 14px; font-family: Arial #000000, Arial #000000, ...

Utilize CSS to eliminate gaps between spans

I can't figure out how to remove the vertical spacing between these two spans. Any help would be greatly appreciated. The issue I'm facing is the large gap between these two spans: <span class="twentyeight nomargin threshold_green">6</ ...

2-panel accordion interface

Hello there, I've encountered a problem that seems to be related to CSS. Here is the project I'm currently working on: My main focus is on the News accordion menu. The goal is to display a small image (50x50 with padding) next to a large headlin ...