Customize the Bootstrap gutter width when utilizing a CDN

As I transitioned from using Bootstrap 4 via NPM to trying out the bootstrap CDN for my project, I encountered a roadblock. Previously, in my main SASS file, I would declare the grid-gutter-width as $grid-gutter-width: 26px !default; before importing the Bootstrap package.

Now, with the bootstrap CDN linked just before the closing </body> tag and no import in my app.scss, I found myself unable to set or override the grid gutter width effectively. Despite declaring the grid gutter width as before, the gutter continued to display at 30px (15px on each side of the column).

This begs the question - am I missing something in this process, or is it simply not feasible to customize the grid settings when utilizing the CDN?

Answer №1

By utilizing SASS and customizing Bootstrap variables, you can generate a personalized version of the bootstrap.css file upon compilation. The CDN comes with a precompiled CSS file that includes default variable values. To achieve the same outcome when using the CDN, you will need to override each individual style declaration based on those values.

For more information, check out:

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

TableTools for DataTables

DataTables is functioning properly on my website, but I am facing issues with getting the tableTools css to work correctly. Specifically, I'm unable to get the copy_csv_pdf_print.swf file to load. While I can render the table with some styling, other ...

What is the best way to design a content page with linked boxes to various arrays in PHP?

How can I create a PHP menu template that navigates to different pages? I am new to PHP and still learning. I want to achieve something similar to this image: https://i.stack.imgur.com/ylfe8.jpg I have the code for the navigation bar, but I need help crea ...

Guide for modifying CSS in Cassius from the blueprint CSS framework?

Using the blueprint CSS framework, I have stored the blueprint files in the static/ directory and linked them in default-layout.hamlet like this: <link rel=stylesheet media=screen href=@{StaticR blueprint_screen_css}> <link rel=stylesheet media=p ...

Angular 7 Material: How to perfectly center align your cards side by side

When I have an abundance of material cards, they tend to align vertically. Is there a way to align the cards horizontally from left to right instead? ...

Validation of user input alongside input masking using jQuery

One issue that I am encountering is that form inputs with assigned masks (as placeholders) are not being validated as empty by jQuery validation. I am using: https://github.com/RobinHerbots/jquery.inputmask https://github.com/1000hz/bootstrap-validator ...

Changing the Values of Variables in an npm Package within SvelteKit

I have been working on a SvelteKit component library where I define variables for components like background-color and font-family in a CSS file. Inside the ./dist/index.js file of my library, I export the CSS using `import './main.css'`. When in ...

What is the process for altering the active status in pagination?

How can I make the active class in my pagination appear in red? Here's the code snippet I have: In my script.js file: $(".pagination").append("<li class='page-item' id='previous-page'><a class='page-li ...

Concealing a div with CSS on a WordPress site

This is the snippet of code that I need to keep hidden <div class="count"> <div class="number">1</div> <div class="text">donation</div> </div> I attempted to ...

Automatically displaying the navigation bar upon initial loading of the HTML page

Is there a way to adjust this code so that the side nav bar remains open when the page loads for the first time? I would like the side nav to be open by default. function openNav() { document.getElementById("mySidenav").style.width = "250px"; docum ...

How do I fix the issue with my text being truncated?

While working on my website, I encountered an issue where the text is being cut off at the bottom of the page. I could adjust the margins and resize images and text to fit within the page, but I would prefer to allow scrolling on the webpage. Can anyone pr ...

Having trouble with CSS margins behaving unexpectedly

Could someone please explain why I am unable to add margin-top/bottom or padding-top/bottom to this "a" tag? I am trying to center "Konoha" in the header box. html{ background-color: white } body{ width: 88.5%; height: 1200px; margin: 0 auto; borde ...

Reach out to us using our Gmail contact form

Hey there! I've been working on setting up a contact form to connect with my Gmail account. I tried the traditional method of creating an HTML form and PHP file to use the mail() function, but it's not functioning properly. My goal is to have a ...

The absence of a div tag is leading to issues that need to

I am facing a challenge.. I ran divcounter.jhousemedia.com and it detected two missing div tags. The baffling part is that both of these posts are identical, so I am unsure why this discrepancy exists.. One post without the issue: Another post with 2 mis ...

What is the best way to align certain items to the left and others to the right in a Bootstrap nav bar

Just started studying bootstrap as a beginner yesterday. In this example home, link, more, and options are displayed on the left side. I tried using the "class pull-right" to position the "home" at the top right corner of the screen, but it's not work ...

Struggling with customization of CSS for a.class:hover in jQuery mobile

Currently, I am engaged in developing a project using the jquery mobile framework 1.0. My goal is to create a gradient background effect on the anchor defined below as .grid-anchor when users hover over it. However, despite my efforts, I have been unsucces ...

Alignment Issue with Bootstrap Datepicker

My current challenge involves integrating a bootstrap datepicker into a website. The problem arises when the calendar modal is misaligned due to some pre-existing CSS that includes a margin on the body element, and the modal is absolutely positioned. $( ...

What is Reddit's secret to producing a clean top header with no margins?

While inspecting the code in Chrome Developer Tools, I noticed that when I tried to replicate it on my website, it didn't function the same way. I realized that setting margin: 0; eliminated the margins, but shouldn't the margins technically be ...

Stop the iframe video when the modal is closed

I'm currently developing a website that incorporates the code showcased in this tutorial to launch a modal window featuring an iframe for playing YouTube or Vimeo videos. The issue arises when, as mentioned in the comments on the tutorial page, there ...

How come my image isn't cooperating with text-align and vertical-align?

Hey everyone! I'm a newcomer to this community and a newbie when it comes to HTML. :D I encountered a problem recently and discovered that Stackoverflow is full of amazing developers. That's why I've decided to share my problem here and am ...

Is it possible for CSS to automatically style paragraphs based on the preceding heading class?

Looking to create some unique CSS rules for formatting interview transcripts. The format I have in mind is as follows: <h2 class="interviewer">Alice: [00:00:00]</h2> <p>Is it ok if I ask you a question now?</p> <h2 class="inter ...