The Bootstrap popup fails to display when adding the bootstrap.min.css file

I am experiencing difficulties with CSS as I am relatively new to it. Currently, I am utilizing the bootstrap popup in the following example. Upon clicking the 'Full Spec' button, a popup box appears.

However, it seems that the file bootstrap.min.css is causing an issue. When including bootstrap.min.css in my code, the popup box fails to appear. If I exclude that file, the popup box does appear, but the alignment and size of my images, text, and other elements are altered.

Is there a way for the popup box to display without disrupting the alignment and sizing of the image/text? I have attempted to modify the code in bootstrap.min.css, but it proves difficult as I need to scroll horizontally instead of vertically.

Please assist me in resolving this problem. Thank you!

https://i.sstatic.net/xnQIm.png

<head>
    <meta charset="utf-8">
    <link rel="icon" type="image/ico" href="favicon.ico">
    <title>Test</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">

    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/font-awesome.css">
    <link rel="stylesheet" href="css/animate.css">
    <link rel="stylesheet" href="css/templatemo_misc.css">
    <link rel="stylesheet" href="css/bootstrap.css">  

    <script src="js/vendor/modernizr-2.6.1-respond-1.1.0.min.js"></script>
    <script src="js2/jquery.js" type="text/javascript"></script>
    <script src="js2/bootstrap.js" type="text/javascript"></script> 
</head>

Answer №1

It is not advisable to directly modify the code within the bootstrap.min.css file. What if you need to use the same classes in the future or update your Bootstrap version? Instead, you can create a custom CSS file to override the specific class(es) that you want, and then include this custom CSS file after the Bootstrap one, like this:

<head>
    <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="custom.css">
</head>

If there are conflicting classes with the same name in both CSS files, the styles from the latest CSS will take precedence over the earlier ones.

I conducted an experiment by adding both bootstrap.min.css and bootstrap.css to my application, and observed significant style differences. When I tried each stylesheet individually, the page layout varied even more despite both being version 3.3.5. If you haven't already, try testing each stylesheet separately to see how it affects your page's layout. Any drastic changes could indicate the usage of different Bootstrap versions.

The main distinction between bootstrap.min.css and bootstrap.css lies in performance. The ".min" denotes minified for production purposes, whereas the other file is suited for development. There should ideally be no code variance between the two; they should share identical classes.

If no superior solution arises, I recommend sticking with the original Bootstrap version you have been utilizing, likely the unminified edition.

EDIT: Overriding a class will solely impact the properties you specify. For instance, consider this initial class:

h1 {
    color: orange;
    background-color: black;
}

And this overriding class:

h1 {
    color: red;
}

This would change only the color property while retaining the black background for h1 elements. Consequently, instead of an orange heading on a black background, you'll now have a red heading against a black background.

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

Discover the process of incorporating secondary links into your dabeng organizational chart!

I need to incorporate dotted lines on this chart, such as connecting leaf level nodes with middle level nodes. import OrgChart from '../js/orgchart.min.js'; document.addEventListener('DOMContentLoaded', function () { Mock.mock(&apo ...

Having trouble getting a div to slide to the left on hover and collapse on mouseout using Jquery?

Hey there! I need some assistance in completing this code snippet. I have a div with overflow:hidden and a margin-left of 82px. Inside it, there is a share link and a ul list containing three external links. When I hover over the share link, everything w ...

Tips on eliminating the 'first', 'previous', 'next', and 'last' buttons in the twbs pagination plugin

I am searching for a straightforward pagination solution that only displays page numbers without control buttons like "first," "previous," "next," and "last." I have looked through the options available in twbs-pagination's github documentation and on ...

ng-init assign value to a new object

<!DOCTYPE html> <html> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script> <body> <div ng-app="myApp" ng-controller="myCtrl2" ng-init="person = new Person('Al ...

What is the functionality behind a free hosting website?

Is anyone familiar with websites like Hostinghood, where users can create a subdomain and upload HTML, CSS, etc.? I'm curious about how they operate and how I can create a similar site. This is my first question here, so please respond instead of disl ...

Issues arise with jQuery onclick event functionality when the DOM structure is altered

I'm struggling to grasp the concept of jQuery (v1.11) when it comes to events and how DOM interaction impacts those events. The scenario: I am creating a grid of inline-blocks with the class "letter" and listening for clicks: $('.letter).on(&a ...

Tips for positioning tables on a page

I have 4 tables and a submit button. How can I make them more compact? Maybe like this: </img> This is my HTML code: <body> <form action="/cgi-bin/form.py" id="myform"> <table class="table-fill"> ... ...

What causes a neighboring div to change width when a multi-line span is present?

Here is my React code: <InfoWrapper> <InfoCircle> <span>i</span> </InfoCircle> <span className="info-label"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. elit. </span> </InfoWrap ...

Reposition buttons using JavaScript

I attempted to modify the button that appears at the top of an HTML page. <div class='play'> <input id="play" type="button" value="Play" onclick="mode('play');startSlideshow();" /> </div> <div class='pause ...

How can I extract data from HTML popup tables and charts using Python?

Currently, I am in the process of gathering data from for a machine learning project related to MMA. Specifically, my goal is to extract the DraftKings opening odds for each fighter by accessing the odds listed under the DraftKings column. By clicking on ...

Troubleshooting Problem with ASP.Net MVC Recaptcha and Jquery Ajax interplay

I am currently incorporating a Google reCaptcha object into a page using ASP.Net MVC, without utilizing models in my forms. Although I have successfully displayed the captcha, the data entered always appears as null when inspecting the RecaptchaVerificati ...

The paragraph text should dynamically update upon clicking a button based on JavaScript code, however, the text remains unchanged despite attempts to modify it

I recently started learning JavaScript and wanted to update the content of a paragraph when a button is clicked. However, I encountered an issue where this functionality doesn't seem to work. <body> <p id="paragraph">Change Text on cl ...

How can I update a CSS class value by utilizing AngularJS variables?

I am currently facing an issue with making my CSS values dynamic. The code I have tried is not functioning as expected. <style> .panel-primary { background-color:{{myColorPanel}} } </style> I came across a similar query on Ho ...

Initiating a Page with Dynamic Modal Window according to Backend Exigencies

Dear experts, can you help me with a problem? I want to implement a modal window on an vb.aspx page if a specific condition from the codebehind query is true. How can I achieve this? Thank you! ...

Auto-fit HTML Webpage Resizer Simplified

Just finished my very first jQuery project, a simple full-width slider. I've been focusing on HTML & CSS and currently working with C#. The problem is that I don't want the page to be scrollable; I want it to autofit to the webpage. Imagine ope ...

Struggling to fix the excess white space appearing underneath my website

I am new to HTML/CSS and I'm currently working on adding a timeline to my website. However, I've encountered a strange issue with the #timeline class where there is an odd block of space below it whenever I try to adjust the height. So far, I ha ...

compress a website to display advertisement

Here is a JSFiddle link I would like to share with you: I am currently working on squeezing the webpage to display an ad on the right side. http://jsfiddle.net/5o6ghf9d/1/ It works well on desktop browsers, but I am facing issues with iPad Safari/Chrome ...

Facing compatibility problems with JavaScript and Cascading Style Sheets in Google Chrome?

Welcome to the site . Let's address a couple of issues with JavaScript and CSS: Firstly, the JS code seems to be malfunctioning only in Chrome, throwing an error that reads: 'Uncaught TypeError: Object [object Object] has no method 'on prij ...

Mediawiki needs to be able to respond effectively to constantly changing and evolving content

My extension generates content dynamically for certain pages. For example, I create headlines using <html> <h1>, <h2> and <h3> tags. I want my mediawiki to respond to these headlines and generate a directory dynamically. I attempte ...

Is there a way for me to create a sidebar that is scrollable, like the one on www.youtube

Hey there! I'm looking to incorporate a feature on my website that resembles the layout of https://www.youtube.com/. More precisely, I want to have a sidebar on the left side displaying playlists, subscriptions, and other options. However, I don' ...