Instructions for utilizing the nav-pill with nav-justified components in Bootstrap3x without incorporating any responsive capabilities

I'm eager to incorporate this into my project :

<div class="container">
        <ul class="nav nav-pills nav-justified">
          <li class="active"><a href="#">Home</a></li>
          <li><a href="#">Projects</a></li>
          <li><a href="#">Services</a></li>
          <li><a href="#">Downloads</a></li>
          <li><a href="#">About</a></li>
          <li><a href="#">Contact</a></li>
      </div>
</div>

My one request is to eliminate the responsive aspects. Specifically, I want to avoid vertical stacking when the screen size decreases.

Yesterday, I spent hours attempting to make Bootstrap 3 unresponsive. Despite trying to create custom CSS files and using compilers on the official site, I struggled due to my limited experience with CSS. After exploring options like bassjobsen's work from here, I realized that completely removing fluidity was necessary. Though there are resources on the Bootstrap website for eliminating responsiveness, they provide only partial solutions. Even after including non-responsive.css as recommended, elements such as my nav-pills still collapse at certain widths. It seems manual modification of each class may be the only solution, making it challenging to tailor Bootstrap 3 exclusively for high-resolution devices (please correct me if I am mistaken).

Regrettably, I'm unable to share more code given my unsuccessful attempts. Any assistance from someone who has faced a similar issue would be greatly valued. While considering transitioning to pure CSS/jQuery, I hope to implement this feature in my design first before making any decisions.

Answer №1

Greetings! Within this menu, you have the ability to:

  • Firstly, remove the class nav-justified to eliminate the responsive styles.

  • Secondly, adjust your container to a fixed width.

    .container {
      width:800px;
    }
    

Take a look at this demo http://jsfiddle.net/52VtD/561/.

In conclusion, if you are solely using Bootstrap for its visual theme, there may be better alternatives.

To retain the styles of the nav-justified, you can isolate them in another class:

.nav-pills li {
  float:none;
  display:table-cell;
  width:1%;
  text-align:center;
}

Check out the demo http://jsfiddle.net/52VtD/566/

Edit

The rationale here -->

I removed the nav-justified class because it was the last one overriding the styles on the ul and likely being called by the media queries. By removing it, you prevent the media queries declaration from changing positions or displays for responsiveness.

To maintain the appearance of nav-justified, I extracted those specific styles and applied them outside of the class declaration that affects responsiveness.

If you refer to http://getbootstrap.com/dist/css/bootstrap.css you can identify which classes are affected by the media queries declaration.

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

Can a file object be transmitted using this method?

I'm new to jquery and I am attempting to upload a File object obtained from my HTML: <label for="photo" class="col-xs-2">Photo</label> <input id="photo" name="fileName" type="file" class="col-xs-4"/> This is the snippet of my J ...

What is the reason behind getComputedStyle having visibility set to visible?

What is the reason behind getComputedStyle always returning element visibility as visible even when no explicit visibility has been set? For instance: getComputedStyle($('#block1')[0],null).visibility; --- "visible" Meanwhile: $('#block1&a ...

Adjust the color of a DIV based on the text value retrieved from an external source

I am looking to dynamically change the text color between red and green based on a numeric value received from an external source (API). If the value is greater than or equal to 50, it should be displayed in red. If it's less than 50, then it should ...

Having trouble retrieving accurate text information from a JavaScript link

I am encountering an issue with my code which consists of links with divs inside them. When I click on a link, it should display another div with data for "Case No" and "Type". However, the problem is that it only fetches the data from the first link click ...

Unable to eliminate top margin in Bootstrap 3 affix feature

Struggling to locate the source of the margin-top when utilizing the affix plugin on my Navbar. You can view [my website here] for better understanding. Should I be implementing Javascript to solve this issue? My current skills in that area are not very ...

When combining <a> with the class line-through, the line does not appear

I am currently utilizing a class to replace the deprecated strike in HTML: .entfall { text-decoration: line-through; } However, when using Firefox 38.x and the following code: <span class="entfall"><a href="some link">text</a></span ...

Ways to create a vertical bottom-up tree view using d3.js

I am trying to create a reverse tree view, starting from the bottom and moving up. What modifications do I need to make? Here is the link to my JS Fiddle: ...

What is the best way to reach the assets/public directory from a routed page in Meteor?

I am currently developing a multipage application using Meteor and am facing an issue accessing public assets from a routed page. For instance, when I go to the route http://localhost:3000/editor, I would like to be able to utilize an image from public/im ...

Develop an outline using D3.js for the clipath shape

After successfully creating a shape with a color gradient, I encountered the need for further customization. If you are interested in this topic, check out these related questions: Add multi color gradient for different points in d3.js d3.js scatter plot c ...

Is it necessary to convert an HTMLCollection or a Nodelist into an Array in order to create an array of nodes?

Here we go again with the beginner guy. I'm working on this exercise from a book called "Eloquent JavaScript". The goal is to create a function similar to "getElementByTagName". However, the first function below is not returning anything and the secon ...

Tips for showcasing the latest Google Map InfoWindows above previous ones

I have a dynamic Google Map with InfoWindows being added dynamically, but I am facing an issue where overlapping InfoWindows do not always display the most recent one on top of older ones. Is there a way to ensure that the latest InfoWindow always shows u ...

What's the best way to retrieve the nth row of a div once the mouse hovers over

$(document).ready(function() { $('div').on('mouseover', function() { alert($('div:eq(' + this + ')')); }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js></ ...

Is there a way to retrieve the dynamically generated text content of an element using document.write?

I am encountering an issue similar to the following: <div id="myDiv"><script>document.write('SOMETHING');</script></div> My goal is to extract the content inside the script tag, which in this case is "SOMETHING" ...

Looking for a carousel slider with thumbnails that allows you to customize the position of the thumbnails? Let me

I am currently using bxslider for my sliders on the website. However, I am facing an issue where the thumbnails are overlapping the main image and I am unable to adjust their position. You can check out the live site at or navigate to any gallery from t ...

Is it possible to use JQUERY AJAX to access different files with a combination of GET

I've set up email verification on my website. After a user submits the form, an ajax post request is initiated to send the email to PHP for comparison with the database. During the verification process, there's also an ajax GET request that shou ...

What are the reasons for the decrease in canvas text quality when using requestAnimationFrame?

I have created a unique canvas effect where text changes color using requestAnimationFrame: var text = 'Sample text'; ctx.fillText(text,canvas_width/2,100); requestAnimationFrame(animate); function animate(time){ ctx.fillText(text,-offset,100 ...

Why is my main.scss having trouble importing other files?

I am experiencing issues with importing my scss file. First, I created a file called main.scss and added some code to it. All the codes are functioning properly and showing up on the webpage. Next, I created two folders named settings and elements. In ...

Having difficulty accessing the verification button within an iframe using Selenium

I'm currently developing a program that allows users to login using Selenium and bypass verification. I have everything else in the program ready, but I've been facing an issue trying to click the verify button. I've tried different approach ...

When utilizing *NgIf, the button will be shown without the accompanying text being displayed

When trying to display either a confirm or cancel button based on a boolean set in my component.ts, I implemented the following code in my HTML: <mat-dialog-actions class="dialog-actions"> <button class="cancel-btn" ...

Ensuring the dropdown menu's functionality in AngularJS

I'm currently working on a code snippet that validates when the user moves away from a specific select element. The goal is to change the border color of the select element to either red or green only when the user tabs away from it or moves the mouse ...