Experiencing issues on the live server as it appears that Bootstrap is not functioning properly

I am facing an issue with my website where it appears distorted when launched on a live server, despite working fine locally. It seems that the Bootstrap styles are not being applied correctly on the live server and I cannot figure out why. If anyone knows the reason behind this problem, please help.

View screenshot-1

View screenshot-2

View screenshot-3

Code snippet provided below has been edited for readability:

<!DOCTYPE html>
    <html lang="en">
        <head>
            <link rel="stylesheet" href="style.css">
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <link rel="stylesheet" href="C:\Users\abhay agnihotri\Desktop\Bootstrap\css\bootstrap.min.css">
            <script defer src="https://use.fontawesome.com/releases/v5.0.7/js/all.js"></script>

            <title></title>
        </head>
        <body>
            <nav class="navbar navbar-default navbar-expand-sm navbar-dark bg-dark fixed-top">
                <a href="#" class="navbar-brand">
                    <div class="on" id="content container alpha">
                        <span class="slide">
                            <a href="#" onclick="openSlideMenu()">
                                <i class="fas fa-bars fa-2x"></i>
                            </a>   
                        </span>
                        <div class="nav d-flex flex-sm-row flex-column">
                            <div id="menu" class="nav va" style="scroll-behavior: unset;">
                                <a href="#" class="close" onclick="closeSlideMenu()"><i class="fas fa-times"></i></a>  
                                <div class="container">
                                    <div class="row">
                                        <div class="col-lg-8 col-md-6 col-sm-8 col-xs-12">
                                            <div class="some1 a"><a>HOME</a><br></div>
                                            <div class="some2 b"><a class="some2 b" href="aboutus.html" style="text-decoration: none;">ABOUT</a><br></div>
                                            <div class="some3 c"><a class="some3 c" href="team.html" style="text-decoration: none;">TEAM</a><br></div>
                                            <div class="some4 d"><a class="some4 d" href="#ourmenu" style="text-decoration: none;">OURMENU</a><br></div>
                                            <div class="some5 e"><a class="some5 e" href="gallery.html" style="text-decoration: none;">GALLERY</a><br></div>
                                            <div class="some6 f"><a class="some6 f" href="contact.html" style="text-decoration: none;">CONTACT</a><br></div>
                                        </div>
                                        <div class="col-lg-4 col-md-6 col-sm-4 col-xs-0"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </a>
                <div class="main">
                    <img src="cart2.png" class="cart img-fluid">
                    <input type="text" class="text-center item" id="inc" value="0"></input>
                </div>
                <img src="add2.png" class="add img-fluid">
            </nav>
            <header>
                <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
                    <ol class="carousel-indicators">
                        <li data-target="#carouselExampleIndicators" data-slide-to="0"></li>
                        <li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
                        <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
                    </ol>
                    <div class="carousel-inner" role="listbox">
                        <div class="carousel-item z active car carss img-fluid"></div>
                        <div class="carousel-item van men img-fluid"></div>
                        <div class="carousel-item maruti women img-fluid"></div>
                    </div>
                </div>
            </header>
            <div class="container">
                <div class="text-center row" style="margin-top:-660px;">
                    <div class="col-lg-3 col-md-1 col-sm-1 col-xs-0">
                        <div class="text-light col-lg-6 col-md-10 col-sm-10 col-xs-12">
                            <h1 class="head">PIZZERIA</h1>
                            <h3 class="text-center foot">SPICYFOOD</h3>
                            <img class="logo" src="kn.png" width=50 height=50 class="media">
                        </div>
                        <div class="col-lg-3 col-md-1 col-sm-1 col-xs-0"></div>
                    </div>
                </div>
            </div>

            <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/2.0.2/anime.min.js"></script>
            <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script> 
            <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script> 
            <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
        </body>
    </html>

Answer №1

Just a simple mistake for beginners :)

If you're looking for the CSS path on your local computer, consider using the Bootstrap 4 CDN link instead:

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">

For the JS CDN, you can find it here:

https://getbootstrap.com/docs/4.5/getting-started/introduction/#js

Answer №2

The reason why you're encountering this issue is due to the incorrect upload of the bootstrap css file.

<link rel="stylesheet" href="C:\Users\abhay agnihotri\Desktop\Bootstrap\css\bootstrap.min.css">

To rectify this, ensure that you indicate the file path correctly:

<link rel="stylesheet" href="...\Bootstrap\css\bootstrap.min.css">

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

Issue with UseState causing a re-render not to be triggered

My orders list state works perfectly on the initial update. However, when an order in the database gets updated, the order list is updated but fails to trigger a re-render even with <...> const [orders, setOrders] = useState([]); useEffect(( ...

Dealing with rejection within the angularJS promise chain

Upon referencing the documentation and personal experience, it is noted that AngularJS's $q "then" method generates a new promise (https://docs.angularjs.org/api/ng/service/$q "The Promise API" section). Let's consider the following code snippet ...

Wrapping text around a container element

Is there a way to make the text wrap around a div when you want the div positioned at the bottom of a container? I've been able to align the text properly with the div when it's on top, but when I attempt to move it to the bottom of the page, th ...

Trouble with the display none function

I am trying to achieve the following: If my shopping cart is empty, I want another div to display over the top of it. Instead of seeing the cart, users should see a message saying 'your cart is empty'. Currently, I have set the other div to dis ...

Tips for updating a list of orders using keywords entered in a text input field

I have a collection of car objects and an input field that triggers a change event. When the value in the input field is updated, I want to reorganize the order of the cars. For example, if I enter "Tau" in the input box, I want the ford object to be plac ...

Converting a JSON array into an object representation

I have received some JSON data that has a specific structure: [ { "items": [ { "id": "xxxx", "description": { "style": "", "specs": "" } }, { "id": ...

What are the steps to incorporate ThreeJS' FontLoader in a Vue project?

I am encountering an issue while attempting to generate text in three.js using a font loader. Despite my efforts, I am facing difficulties in loading the font file. What could be causing this problem? const loader = new FontLoader(); loader.load( ' ...

The text from one section found its way into a different section, blending seamlessly

My Skills text is mistakenly appearing in the home-section. You can see the issue in the image below: https://i.sstatic.net/Bl2GJ.png In the provided picture, the Skills section is displayed within the home section, which is not the intended layout. It&ap ...

Ensure your HTML5 videos open in fullscreen mode automatically

I managed to trigger a video to play in fullscreen mode when certain events occur, such as a click or keypress, by using the HTML 5 video tag and jQuery. However, I am now looking for a way to have the video automatically open in fullscreen mode when the p ...

Preview Image Unavailable

I am currently working on a project that involves creating a form where users can upload an image and see a preview of it before submitting. Unfortunately, I am facing issues with getting the image preview to display correctly. Below is the HTML code snip ...

Regular expressions tailored for a precise format in JavaScript

Is it possible to create a regex that can validate a specific format? For example, if I have version numbers like v1.0 or v2.0 v1.0 or v2.0 My current regex expression only validates the existence of v, a number, or a .. How can I implement validation ...

A step-by-step guide on showcasing Flickr images through API using a Justified Gallery

I am looking to integrate the Miromannino Justified Gallery () into my project, but I want it to showcase images fetched from Flickr. I have successfully implemented the code to retrieve photos from Flickr using the API through Ajax: $.ajax({ url ...

Ways to enlarge the diameter of the inner circle

I've implemented some CSS with JQuery, as seen in this JSFiddle. However, I'm having trouble increasing the width and height of the green circle to be slightly larger than the gray circle (referred to as the main circle) which is positioned at a ...

Turn on / off Button Using a Different Button

I am currently working on an application that is designed to create teams using button selectors. There are two initial teams in play: the (available team) which consists of two buttons - one for selecting a player and populating the player name into the ( ...

The type string[] cannot be assigned to type 'IntrinsicAttributes & string[]'

I'm attempting to pass the prop of todos just like in this codesandbox, but encountering an error: Type '{ todos: string[]; }' is not assignable to type 'IntrinsicAttributes & string[]'. Property 'todos' does not ex ...

Using jQuery to assign the value of a selected list item to an input field

I'm struggling with implementing a jQuery function to achieve the following: When a list item is clicked, it should add a 'select' class and remove any other selected list items The selected list item's data value should be set as ...

Comparing DOM Creation in PHP and JavaScript

My website currently does not have any ajax requests, and here is a simplified version of my code: class all_posts { public function index($id){ $statement = $db->prepare("SELECT * FROM mytable WHERE id = :id"); $statement->exe ...

How to Stop AJAX Requests Mid-Flight with JQuery's .ajax?

Similar Question: Stopping Ajax Requests in JavaScript with jQuery Below is the straightforward piece of code that I am currently using: $("#friend_search").keyup(function() { if($(this).val().length > 0) { obtainFriendlist($(this).va ...

Exploring the concepts of express post and delete responses that are unclear

It appears that I am facing an issue where trying to access an attribute of an element from a JSON file returns null. Additionally, I am still encountering npm audit problems. What are your thoughts on this situation? Below is the code snippet that has be ...

Applying CSS transitions and transforms to SVG elements

Having trouble animating an SVG group with CSS transitions after applying a CSS transform? Check out my code below and let me know if you spot the issue. Inline SVG Code <a href="javascript:void(0)" class="hub-icon-container"> <svg xmlns="ht ...