"Fixing index.html with the power of Bootstrap 4: A step-by

*I am facing an issue where the default bootstrap navbar style appears before my custom styles get applied every time I reload the page. Any assistance would be greatly appreciated*

- Whenever I reload the page, the default bootstrap navbar style appears before my customized styles are applied. Any help is welcome

Using bootstrap 4, below is my index.html file with custom CSS:

Head

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://use.fontawesome.com/75528e6985.js"></script>
<link rel="stylesheet" href="css/css/bootstrap.min.css">
<link href="css/style.css" rel="stylesheet">

Style

.selector-for-some-widget {
        -webkit-box-sizing: content-box;
        -moz-box-sizing: content-box;
        box-sizing: content-box;
    }

    body {
        background: #e9ebee;
    }

    .logo {
        background-color: rgba(18, 101, 204, 0.82);
        padding-top: 2px;
        padding-bottom: 2px;
        padding-left: 7px;
        padding-right: 7px;
        font-size: 29px;
        font-weight: bold;
        border-radius: 11px;
    }

    a .navbar-brand {
        color: #baccce!important;
    }

    .pull-right {
        margin-right: 150px;
    }

    .bookUs-btn {
        color: #5d85b7;
        margin: -56px 88% 29px;
        border-color: #5d85b7;
        font-weight: bold;
    }

    .bookUs-btn:hover {
        background-color: #5d85b7;
    }

    .navbar-nav {
        margin-right: 20%!important;
    }

Nav

<nav class="navbar navbar-dark bg-light bg-faded" style="background: #172944;" role="navigation">
    <div class="container">
        <button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target="#exCollapsingNavbar2">
        &#9776;
      </button>
        <div class="collapse navbar-toggleable-xs" id="exCollapsingNavbar2">
            <a class="navbar-brand" href="#">
               <span class="logo">K
               </span>
             OMRIHE
          </a>
            <ul class="nav navbar-nav pull-right">
                <li class="nav-item ">
                    <a class="nav-link" href="#">PORTFOLIO 
                      <span class="sr-only">(current)
                      </span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">BLOG
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">ABOUT ME
                    </a>
                </li>
            </ul>
            <span class="">
              <button class=" btn btn-primary-outline bookUs-btn">
                 <i class="fa fa-phone-square">
                 </i> Contact Me
               </button>
            </span>
        </div>
    </div>
  </nav>

Answer №1

To successfully implement Bootstrap, you will need jQuery, tether.js, and bootstrap.min.js files.

For more details on how to quickly get started with Bootstrap, please visit this link.

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

Utilizing React Router with HTML5 pushstate in conjunction with Nginx servers

I am working on a React app with react-router and HTML5 pushstate routes. I want to use http://example.com/v2 as the base route for serving my new website. Below are the nginx configurations that I am using: This configuration is designed to catch reques ...

A powerful combination of Angular and jQuery Mobile

Is there a recommended method to combine them or should I stick with jQuery Mobile by itself? I experimented with creating a basic unordered list (ul) and the list items (li) ended up overlapping each other. ...

Pass the AngularJS object to a different MVC Controller when a button is clicked in the MVC view

When a button is clicked on the view, I need to pass an AngularJs object to another controller. CHTML <div ng-repeat="hotel in respData.hotels"> <button type="button" class="btn" data-ng-click="setTab(hotel.code)">Check Availability</bu ...

Tips for showing text beyond the confines of a <div></div> container

<div class="signup"> <div>Tenxian アカウントに必要な情報</div><br/> </div> <br/><br/><br/><br/><br/><br/> <div align="center">@2009 Tenxian &nbs ...

Exploring the possibilities in Bootstrap 5.3: Modifying the maximum width of an individual tooltip

Is there a way to modify the maximum width of a specific Bootstrap Tooltip without affecting the others? I do not utilize Sass or SCSS, and have attempted various methods outlined in the documentation: tooltip-max-width="300px" bs-tooltip-max-wid ...

Use Jquery to locate an element by its Id and then trigger a click event on

Struggling with integrating two Ajax methods in my code, I am looking for a way to make one of them trigger the other. Here is an example scenario: $(function() { //Code that simulates clicking #target and triggers the method below. }); $( "#t ...

Is it possible to store an HTML element tag in a variable?

I've been learning JavaScript on w3schools and freecodecamp, but I stumbled upon something in w3schools that has me puzzled. Can someone please explain why this particular code snippet works? The variable "text" is declared as containing the string " ...

Altering the appearance of an input field upon submission

https://jsfiddle.net/3vz45os8/7/ I'm working on a JSFiddle where I am trying to change the background color of input text based on whether the word is typed correctly or incorrectly. Currently, it's not functioning as expected and there are no e ...

What could be causing my backend to malfunction while the website is live?

Currently, I am working on a PHP5 dynamic site where content such as galleries and news can be added from the backend. Everything was functioning perfectly fine on my localhost, but when I uploaded it online, the dynamic part stopped working. The default P ...

CSS transitions/transforms are failing to impact the necessary elements

I'm currently grappling with advanced transitions and transforms, and encountering some challenges with a section I'm developing. I've managed to get everything working as needed, except for the fact that there is an h5 element positioned ov ...

Having difficulty in closing Sticky Notes with JavaScript

Sticky Notes My fiddle code showcases a functionality where clicking on a comment will make a sticky note appear. However, there seems to be an issue with the Close Button click event not being fired when clicked on the right-hand side of the note. I have ...

The text in the Bootstrap 4 card spills over the card-text boundary

I've encountered an issue when trying to insert text into a card-text paragraph. Here's what happens: https://i.sstatic.net/CWGh2.png I've been attempting to resolve the problem without success. I'm completely stumped on how to fix it ...

When utilizing the JavaScript createElement() method to create elements on keydown, it will not be compatible with jQuery's draggable() method

I'm currently developing a drag and drop feature for a project, allowing users to add items to a work area and then position them by dragging. I'm facing an issue where I want to create multiple instances of the same element using a key code, but ...

Issues with a jQuery ajax request

Recently delving into jQuery and finding it enjoyable so far. However, I've encountered an issue with an ajax call and could use some assistance. Here's the code snippet for my ajax call: // Initiating the ajax request $.ajax({ // PH ...

Incorporating a switch button for toggling functionality in a Rails application

I attempted to convert a select tag into a JavaScript toggle on/off switch within my Rails application. After some searching, I came across a straightforward solution on the W3Schools website. http://www.w3schools.com/jquerymobile/tryit.asp?filename=tryj ...

The Navbar Button is having trouble with vertical alignment

I've been experimenting with Bootstrap to customize a navbar to my liking. I'm having trouble getting everything vertically centered properly in this menu, as you can see in my code. I've made some okay adjustments by tweaking the margin, bu ...

The CSS dropdown menu is malfunctioning on Internet Explorer and Firefox

After searching for a solution and coming up empty-handed, I have decided to ask a question. The drop-down menu on my computer and other devices at home works perfectly in Chrome but not in Firefox and IE. #menu { position: absolute; left: 50%; bottom ...

Is there a Problem with Paging in Meteor with Jquery?

I implemented Pagination using Jquery, but I encountered an issue along with the following error message: Uncaught TypeError: Object [object Object] has no method 'customPaginate' I am unsure how to resolve this problem. Could you please take ...

Chrome is where all the action happens, while Firefox prefers to keep things on the left

After a long break, I returned to designing my website and re-learning CSS. My approach involved creating a WordPress-integrated site with minimal HTML/PHP work, focusing more on utilizing the available CSS classes and IDs provided by a template theme (Bla ...

Creating a soft focus effect in a specific region (behind the text)

While working on my homepage created with HTML/CSS/Javascript, I have text positioned at the top left corner of the screen. The challenge arises from the fact that I am using different backgrounds sourced from Reddit, and a script randomly selects one duri ...