The rendering of Vue-bootstrap is not functioning correctly

I recently set up a new webpack project using Vue and Bootstrap. However, it appears that the styling for bootstrap elements such as b-nav, b-nav-item, and b-badge is not displaying correctly. This issue seems to affect most other element types as well.

You can see the problem here: Vue-bootstrap does not render

Main template:

<div class="container-fluid">
   <b-nav tabs>
      <b-nav-item to="/lists">Verlanglijstjes</b-nav-item>
      <b-nav-item to="/ownlist">Eigen lijstje</b-nav-item>
      <b-nav-item to="/settings">Instellingen</b-nav-item>
      <div class="pull-right">
         <span>Ingelogd: {{ user }}, {{ household }}</span>
         <b-button variant="link" @click="logOff"><icon name="sign-out" class="button-icon"></icon>Uitloggen</b-button>
      </div>
   </b-nav>
</div>
<div class="container">
    <h1>Sinterklaas</h1>
   <router-view/>
</div>

Child template:

<div>
   <div v-for="item in items">
      <b-badge @click="deleteItem(item)" variant="danger"><icon name="trash"></icon></b-badge>
      <b-badge @click="editItem(item)" variant="primary"><icon name="pencil"></icon></b-badge>
      <span>{{ item.description }}</span>
   </div>
</div>

Main.js file:

import Vue from 'vue';
import VueCookie from 'vue-cookie';
import BootstrapVue from 'bootstrap-vue';
import Icon from 'vue-awesome/components/Icon';
import App from './App';
import router from './router';
import 'bootstrap/dist/css/bootstrap.min.css';
import 'bootstrap-vue/dist/bootstrap-vue.css';
import 'vue-awesome/icons';

Vue.use(BootstrapVue);
Vue.use(VueCookie);
Vue.component('icon', Icon);
Vue.config.productionTip = false;

/* eslint-disable no-new */
new Vue({
   el: '#app',
   router,
   template: '<App/>',
   components: { App }
})

Answer №1

Success! I finally located it.

import 'bootstrap/dist/css/bootstrap.min.css'

Unfortunately, this code snippet is not functioning properly. The specified css file should not be the minified version.

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 Vue.js with Firestore: Retrieve information from Firestore without rendering any data on the screen

When attempting to display my data from Firestore, I encountered an issue where the data was retrieved successfully when hovering over the <td> tag but not actually displayed. Here is my file for fetching data from Firestore: <template> & ...

What steps are involved in building a modal pop-up in Angular without using any pre-existing libraries

I am looking to create a modal popup when a button is clicked. I want to achieve this without relying on any additional dependencies. The method I have used below successfully creates a fully functional modal, but I am unsure if this is the best way to do ...

Tips for positioning an advertisement at the center of a full-screen HTML5 game

I am struggling to find a way to perfectly center my advertisement in a fullscreen HTML5 game. The game automatically expands to fullscreen when played, and I want the advertisement to always be positioned in the center, regardless of whether the game is b ...

Why does Vue reset a v-binded property when a v-model property changes?

Apologies if the title doesn't fully capture my query. In the brief Vue code snippet below, I have 2 input fields. One utilizes v-bind and the other uses v-model. I am puzzled as to why changing the second input resets the value of the first input. ...

The functionality of aria-expanded is not functioning properly when set to false

Having trouble with the bootstrap accordion feature. When the page loads, the accordions are expanded by default instead of being collapsed. I want them to start collapsed and then expand when clicked. Here is the HTML code: <!DOCTYPE html> &l ...

I'm currently working on implementing custom hover animations for the navigation items in my React application, using Bootstrap nav. However, I'm facing an issue where

I'm attempting to implement a custom hover effect on my navigation items using external CSS. However, when I import it into my Navbar, the Bootstrap styles are not being overridden and the effect is not visible. Additionally, when the Navbar collapses ...

Display an icon button when a user edits the text in a text field, and make it disappear once clicked on

Figuring out how to incorporate a v-text-area with an added button (icon) that only appears when the text within the text area is edited, and disappears once it is clicked on, has proven to be quite challenging. Below is a simplified version of my code to ...

Apply a box-shadow to the lower part of the div starting from the center

After much searching, I finally found a preview of what I had in mind. Unfortunately, I couldn't find the right words to describe it. Here is the link to the image for reference: https://i.sstatic.net/t2q27.png Thank you in advance for your help. ...

Creating a grid layout with images encapsulated within a div using HTML

I am struggling to create a grid of images with padding between them inside the main_block div. The issue I'm facing is that I can't get the images to align next to each other using inline block or break them with a because they go in line ins ...

Replace inline formatting with cascading styles

So, I'm currently working with a service provided by DRUPAL that has its own predefined style. I attempted to use CSS with the !important tag to override the existing style, but unfortunately it doesn't seem to be effective. The default style fr ...

What is the best way to align the navbar-brand link in the middle of a Bootstrap 4 navigation bar?

This question may seem like a duplicate, but it is not. I am specifically asking about Bootstrap version 4.3 and not any earlier versions. The answers I have found so far are either not applicable to the current version (useless for updated projects), or ...

Guide on hosting Google's Material Design Icon-Fonts on your personal server and incorporating them into your website

To access the Material Design Icon Fonts, it is advised to download them in various formats such as ttf, eot, woff, and woff2. These fonts can then be hosted on a server location and integrated into your CSS using the following code: @font-face { font- ...

Leverage jquery to adjust the height or width of an element depending on which dimension is larger

I'm a beginner in jquery and html and am currently developing a gallery webpage. The functionality involves setting the selected image as the page background and then scrolling vertically based on the mouse pointer's position. This works well for ...

Incorporate an external script into your Vue.js application

Seeking to integrate a simple JavaScript script with an external link to the library into my Vue.js application, I have encountered the following: <script type="text/javascript" src="https://my_site/index.js"></script> <link rel="styleshee ...

Position an iframe in alignment

I'm working on a HTML page and I have been trying to figure out how to align an iframe at the bottom of the page so that it spans the entire width. Despite my efforts, I haven't been successful in getting the iframe to align properly at the botto ...

What is the method for adjusting the file browser size within Bootstrap 4?

Is there a way to adjust the size of the file browser (either making it large or small)? Perhaps by using a class like custom-file-lg Here is an example code snippet from Bootstrap 4 documentation: <div class="custom-file"> <input type="file ...

Adjust SVG size as per parent container in AngularJS custom directive

I have a unique situation where I am integrating an angular directive into a dynamically-sized element. The directive itself is made up of an SVG which adjusts based on the size of the container. I am working on making sure the SVG automatically resizes an ...

Why won't the CSS style in my HTML file display properly in Django?

I've been encountering an issue with my CSS file not working in Django, and I'm unsure of the reason behind it. Despite numerous attempts to troubleshoot, the problem persists. I have included {%load static%} at the beginning of my HTML file, and ...

Show a background picture while hovering on the main image

Is there a way to make the background image appear when hovering over the original image and disappear when no longer hovering? Below is a snippet of my HTML and CSS. Is there a straightforward CSS command to hide the original image or show the background ...

"Error: Unable to access the property '$emit' of an undefined value" - VueJS

I'm currently working on implementing a basic authentication system in vuejs. I have a set of objects containing valid usernames and passwords. I am looping through this list to validate the entered username and password. If there is a match, I trigge ...