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

Implementing JavaScript Code in TypeScript

Every JavaScript code should also be valid in TypeScript, but when attempting to run the following code snippet below, an error is triggered. Could someone convert this JavaScript code into TypeScript? Error: 20:9 - TS2531 Error: Object is possibly 'z ...

Adjusting the width of a button can result in gaps forming between neighboring buttons

I am currently working on a calculator project that involves customizing the width of a specific button with the ID equal. However, when I adjust the width of this button, it results in unexpected spacing between the third and fourth buttons in each row, c ...

Displaying a loading icon with Jquery until the image finishes loading

I created a script to display a loader while an image is loading. My question is how can I implement this for multiple images? Here is the working script: http://jsfiddle.net/4QhjD/ The jQuery code: $(window).ready(function(){ $("#image").load(funct ...

Configuration options for content division in a table cell

Please see the following fiddle which I have attempted: http://jsfiddle.net/9LdEc/ code: html: <div id="CorpDealerSearch"> <div class="row"> <div class="left"> Quarter To Date </div&g ...

Using jQuery to display checkbox text even when it is not directly adjacent to the checkbox

I'm struggling to display the checked value text as shown in the image without any refresh or click. Can anyone offer assistance? This is my PHP dynamic form: <div class="products-row"> <?php $tq=$conn->query("select * from os_tiffen ...

Determine which division is currently at the top of the scroll

I am having trouble retrieving the data attribute of each div with the class ".section" that has scrolled to the top. Currently, only the first div is being recognized, while the others at the top are not registering. Take a look at the example provided b ...

Leverage Jasmine for testing a jQuery plugin

I'm currently utilizing the angular-minicolors library () within an angular controller: angular.element("myelement").minicolors({ position: 'top left', change: function() { //custom code to run upon color change } }) Wh ...

Sending checkbox status through ajax

Before assuming it's a duplicate, please carefully consider my concern: I am using an ajax function to post serialized data of checked checkboxes. I have approximately 40,000 checkboxes selected, but when I check the count of the serialized data, I a ...

Is it more effective to specify the class within the selector when using jQuery to remove a class?

Does including the class in the selector when removing a class using jQuery have any impact on performance or best practices? I'm curious if there will be any noticeable difference. For example, do you include it like this: $('#myList li.classT ...

Update the contents of a webpage using AJAX

Can anyone help me with loading likes into a div using AJAX every second? I want the page's URL to be likes.php?p=0 on page load, likes.php?p=1 after 1 second, likes.php?p=2 after 2 seconds, and so on. This is my code snippet: var loadLikes = func ...

When hovering over an element, I must utilize a selector and reference a variable that was defined outside of the hover state in order to

Explaining this code may be a challenge, but I'll give it my best shot. Here's the code snippet: $('#navibar a').hover(function(){ var position = $(this).position(); var width = $(this).width(); $('#underliner'). ...

"Implementing a click event on a dynamically generated element is triggering the event for all of its parent elements

I have a task to generate a dynamic table with data retrieved from the server. Each row in the table contains a tag that I am trying to link to a click event. The code snippet below demonstrates how the dynamic table is created: function ProcessResponse ...

Using CSS Classes with PHP Variables in Conditionals: A Handy Guide

I have limited experience in programming and I'm attempting to edit a .php file within a Wordpress theme. Please keep this in mind as I explain my issue. Within the theme, there is code that calculates the average score from 1 to 10 and then displays ...

React- hiding div with hover effect not functioning as expected

I'm having trouble using the :hover feature in CSS to control the display of one div when hovering over another, it's not functioning as expected. I've successfully implemented this on other elements, but can't seem to get it right in t ...

The div swiftly clicks and moves beyond the screen with animated motion

Here is a code snippet that I am working with: $(document).ready(function(){ $(".subscriptions").click(function (){ if($(".pollSlider").css("margin-right") == "-200px"){ $('.pollSlider').animate({"margin-right": '+ ...

Ways to direct to a specific div upon clicking an anchor tag following a page reload?

<a href="#goto">Link 1</a> <div id="goto">DIV</div> Whenever I click on the anchor tag, my webpage reloads and displays a new div with the ID of goto. This div was previously hidden but is now visible at the bottom of the page. I ...

What is the best way to extract specific keys from a PHP JSON object?

I would like the PHP function to generate a list of keys where the value is equal to or less than a specified variable. <?php $t = 35; $jsonobj = '{"ABC":35,"DEF":36,"GEH":34}'; $obj = json_decode($jsonobj); ...

Refresh choices for the user interface selection menu

I've successfully mastered the art of redefining options for Webix ui.richselect/ui.combo. The technique involves: richselect.getList().clearAll(); richselect.getList().parse(options_data) Now, I'm facing a challenge with changing options fo ...

What is the purpose of adding data to the end of a URL?

There are two primary methods for appending data to a URL, although there may be additional ways. Using the Http get method With the help of .serialize() function Both of these methods involve adding data to the URL, typically in connection with forms. ...

Interact with HTML style attribute using JavaScript

Is there a way to retrieve a specific CSS property from the style attribute of an HTML element, without considering the stylesheet or computed properties? For example: <div style="float:right"></div> function fetchStyleValue(element, propert ...