VUE component disregarding CSS styles

Check out my awesome VUE component below:

<template>
      <div>
          <div class="bottom-footer">  
            {{msg}}
          </div>    
      </div>
    </template>

    <script>
    export default {
      name: 'LayoutFooter',
      data () {
        return {
          msg: 'my test'
        }
      },
      mounted () {
      }
    }
    </script>

    <!-- Add "scoped" attribute to limit CSS to this component only -->
    <style scoped>
      .bottom-footer {
        height: 200px;
        background-color: #A7BFE8;
      }
    </scoped> 

For some reason, VUE seems to be ignoring my scoped CSS. The styles are not being applied when the page is rendered, and there aren't any console errors showing up. I even tried removing the scoped attribute with no luck. Any suggestions on why VUE might be behaving this way?

Answer №1

<style scoped>
.bottom-footer {
height: 200px;
background-color: #A7BFE8;
}
    </style>

Don't forget to properly close the style tag.

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

Is there a way to incorporate innerhtml (or innertext) with the h() function for adding content?

Due to certain requirements, I need to utilize virtual DOM. Below is the code snippet that I am working with: // test.js import { h, ref } from 'vue' const ButtonCounter = { name: 'button-counter', props: { tag: { type: S ...

Is it possible to showcase dates within input text boxes prior to POSTing the form?

I am currently working on a form that posts to a PHP script by selecting a date range. For a better understanding, you can check out my visual representation here. Before the data is posted, I would like to display the selected dates in empty boxes or inpu ...

Incorporate style elements dynamically using an array in Vue

My progress bar's width and color are determined by data from an array. The color of the bar changes based on the value of the data - grey if the progress is 0, blue if it's more than 0, and green if it's 100. <div class="card-item" v-fo ...

The structure of the figure tag for HTML5 validation

Could you please confirm if the Figure tag is correctly used in the html structure? Regarding html5 validation, can I use this structure? <a href="#"> <figure> <img src="" class="img-responsive" alt=""> <figcaption> ...

Using Vuejs for Seamless Facebook Social Login

Currently utilizing Laravel Vuejs, I'm attempting to implement social login with the vue-social-auth plugin. However, upon clicking the 'login with Facebook' button, a new Facebook window opens but unfortunately the client id and redirect ar ...

What is the reason behind VueJs not having built-in support for multiple select options?

Recently delving into the world of vue, I encountered a challenge while working on an update form. When trying to pre-select multiple options using the selected attribute, I noticed that only the last option was being selected. Upon further investigation, ...

Navigating Wordpress posts with a Month data format filter in Vue.js

Can anyone suggest the most effective method for filtering WordPress Posts by month using Vue.js? I am currently retrieving my data from WP_JSON posts, but I need a dropdown menu that allows users to select a specific month such as "September" so that onl ...

How to pass route parameters using v-link in Vue Router

Within the Parent.vue file, I have included this anchor tag: <a v-link="{ path: '/somepath/somesubpath', query: { messageId: 999}}"> Here </a> And also this one: <a v-link="{ path: '/somepath/somesubpath', params: { me ...

React Div Element Not Extending to Web Page Margin

creating white space between the green div and both the top and sides of the screen This is my index page export default function Home() { return( <div className = {stylesMain.bodyDiv}> <div>home</div> &l ...

VueJS failing to pass parent data to child component

I'm fairly new to Vue Framework and I'm trying to figure out how to update a child component based on changes in the parent component's attributes. In the code snippet below, I've created a component that displays a greeting message bas ...

Connect the mileage tracker to a Datalist or grid view component

I recently downloaded the Odometer Sample from , however, I am facing an issue where only the first element in the Datalist is getting the Odometer display, while others are not displaying it. Here is the snippet of code: <script type="text/javascript" ...

As the page is scrolled upwards, the custom cursor's location shifts accordingly

In developing a custom hover cursor for my video div, I am encountering an issue where the cursor does not move with my mouse and remains in place when I scroll. Could someone please review my code and identify what I am doing wrong? Additionally, I have ...

Is it possible to dynamically change the color of text based on its position using CSS, JS, or JQuery?

I am currently working on a corporate website and have been tasked with creating a unique design for a specific page. The design includes the following elements: A body background gradient that transitions from their primary color to white in a top-to-bot ...

Unable to navigate through images on Bootstrap Carousel using previous and next buttons

Despite following tutorials and examining the HTML code on bootstrap, I'm facing issues while trying to create a carousel. I believed that everything was done correctly, but when I click on the next button, nothing happens. <!DOCTYPE html> < ...

Elements on the page appear and disappear as you scroll down

Whenever my scroll reaches the bottom of element B, I want my hidden sticky element to appear. And when I scroll back up to the top of element B, the sticky element should be hidden again. Here are my codes: https://i.sstatic.net/J49dT.jpg HTML <htm ...

What could be causing the lack of triggering Vue.js beforeUpdate, updated, and activated events during execution?

Can you identify which lifecycle hooks are executed in this vue.js code? beforeCreate created mounted but not: beforeUpdate updated activated Check out the code on jsFiddle var vm = new Vue({ el: '#app', data: function() { return ...

What's the best way to stack two input fields vertically and combine them into a single unit?

My goal is to have two inputs placed inside a container, one above the other with no space in between and without separate borders for each input. I am using Bootstrap, but so far my attempts with vertical alignment have been unsuccessful. Here is the code ...

Changing the state of an object property within a Vue watch

In my current project, I am attempting to set the selected boolean value to true in an array of objects based on certain conditions. Specifically, I want to update the selected property in the items array when the from_id matches the item_id in another arr ...

Tips for ensuring all data is downloaded in Firebase (Firestore) Storage before proceeding?

I am currently developing a light dashboard in Vue that connects to Firestore and Storage. As someone who is not an expert, I have encountered a roadblock in what should be a simple task. The issue lies with a function that is meant to retrieve all URLs ba ...