The content in the footer is not displaying correctly (Vuejs)

I recently developed a component with a title and a background color meant to cover the entire page, but it seems to have a top margin that I can't seem to remove. Additionally, I created a footer component that should always stay at the bottom of the page and adjust its position based on the content added. However, the content overlaps the footer and even crosses over it. How do I go about fixing this issue?

Background CSS:

<style scoped>
*{
    margin: 0%;
    padding: 0%;
}
.background{
    position: relative;
    height: 88vh;
    background-color: #3B3B3B;
}
.title{
    border: 1px solid #707070;
    border-left: none;
    border-right: none;
    
}
.title h2{
    text-align: left;
    color: #B16DFF;
    padding-top: 0.8em;
    font-size: 2em;
    padding-bottom: 0.5em;
    margin-left: 1.5em;
    font-weight: 600;
}

Footer CSS:

<style scoped>
.container{
  width: 100%;
  margin: 0%;
  position: absolute;
  bottom: 0%;
  background-color: #232323;
}

.container h2{
  font-weight: bold;
  color: #B16DFF;
  font-size: 1.5rem;
  padding-top: 1.1em;
}

.container #text{
  position: relative;
  float: left;
  padding-left: 5em;
  text-align: justify;
  padding-bottom: 2em;
}

.container p{
  font-weight: 600;
  font-size: 0.8rem;
  color: white;
}

.container #title{
  padding-bottom: 0.4em;
}

.container #description{
  padding-bottom: 1.3rem;
}

.container #images{
  position: relative;
  padding-top: 3em;
  float: left;
  padding-left: 5em;
}

.container ul li{
  display: inline-block;
  padding-left: 2em;
}

Answer №1

Your background css includes a specific scoped style that limits its application. Additionally, when setting a css property to 0, unit specification is unnecessary.

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

How can I remove HTML tags from a string using .NET?

Does anyone know of an efficient way to strip HTML tags from a string of HTML text? ...

Caution: It is important for every child in a list to have a distinctive "key" prop value. How can a shared key be used for multiple items?

When I click on a header from my list, an image should appear. However, I'm encountering an error that needs to be resolved. I've been struggling to find a solution for adding unique keys to multiple elements in order to eliminate the error. Des ...

Enhance the appearance of Font Awesome stars by incorporating a hover effect

Is there a straightforward way to make them turn solid yellow when you hover over them? const styles = theme => ({ root: { flexGrow: 1, overflow: 'hidden', padding: theme.spacing(0, 3), }, paper: { maxWidth: 800, mar ...

Disabling the ability to edit the rightmost portion of an input number field

I am looking for something similar to this: https://i.stack.imgur.com/ZMoNf.jpg In this case, the % sign will be shown in the input field by default and cannot be changed or removed. The user is only able to modify the number to the left of the % sign. P ...

:value can be utilized in conjunction with v-for

I'm struggling to understand why I can't replace the :value=MYVALUE with :value={{ item.level }}. Can anyone clarify this for me? <v-progress-circular v-for="item in Webs" :key="item.name" :rotate="-90" :size= ...

Adjust the paragraph font size within the bootstrap stylesheet

We currently utilize the bootstrap v2 CSS and are interested in globally increasing the font size by a point or two. I am wondering if this adjustment is a straightforward modification within the CSS file or if it requires a more complex approach. After a ...

Is it possible to use an :after background-image to layer on top of the following element?

Seeking assistance on adding an image as a :after element to a navigation bar. The goal is for the image to cover the top portion of the next section according to the design. I have set the :after element as position: absolute with a top: 100%, but it app ...

Error: Jasmine cannot access a property of undefined value

Just getting started with js and jasmine Attempting to create a jasmine test case for my method. Encountering an error: TypeError: Cannot read property '0' of undefined. Tried different ways of passing arrays into my method sports but still facin ...

What is the reason for the absence of a shorthand property in CSS that combines width and height measurements?

Have you ever thought about using a shorter property for specifying an item's width and height in CSS? Currently, we have to write: selector {width: 100px; height: 250px;} While this is already pretty fast, wouldn't it be even quicker if we c ...

Create collapsible horizontal submenus in Bootstrap for mobile devices

I created a modal specifically for mobile users that displays when they access the site. It features various categories and nested menus for easy navigation. <!-- Modal --> <div class="modal fade" id="exampleModalCenter" t ...

I'm experimenting with using jQuery toggle to switch between text and images on my webpage

I attempted to use jquery "toggle" in order to hide the div containing text and display an image instead, and vice versa. However, when I click on the button, it does not work as expected. The button is from a bootstrap example - could that be the source o ...

Trouble maintaining router.params after page refresh

I'm experiencing a problem with vue-router. On the homepage, I have a list of posts. Whenever I click on one of them, it redirects me to the post page using this code: <router-link :to="{ name: 'article', params: {id: article.id, slug: ...

Steps for Getting Blob Data from Axios in an Express.js Server

I'm currently working on an API that involves sending a Blob Object created in Vue.js to Express.js using Axios.post. Vue.js ... const blobObject = new Blob([content]); axios.post(`http://localhost:3000/post`, blobObject) .then( (resp ...

Vue 2 - props functioning as expected in one component but encountering issues in a different template

This is my primary Vue instance: let App = new Vue({ el: '#app-container', data: { countries: [] }, created() { this.getCountries() }, methods: { getCountries() { let self = this; ...

Eliminating the bottom border of all buttons, except for the last three buttons in the list, solely using pure JavaScript, unless alternative methods are available

I have 3 sets of buttons, with each set containing 9 buttons stacked in 3 columns inside an ordered list (ol) within list items (li). I have removed the bottom border of the buttons to avoid double borders since they are stacked on top of each other withou ...

Switch Button Hyperlink in HTML/CSS

I have the following code: document.addEventListener("DOMContentLoaded", function(event) { (function() { requestAnimationFrame(function() { var banner; banner = document.querySelector('.exponea-banner3'); banner.classList ...

Transferring the final space from a node containing a mixture of content to a separate

Having a multitude of HTML files generated by MS Word, my objective is to modify the contents in order to extract data and perform other tasks. In an HTML paragraph with mixed content, I have noticed that spaces after italicized or bold words also become ...

How come the dropdown menu consistently disrupts my CSS design?

Whenever I add a dropdown menu, my CSS layout gets all messed up. Can someone please explain why this happens and how to fix it? Below is the code snippet: <asp:Label ID="projnamelbl" runat="server" CssClass="editlabels" Text="Project Name"></as ...

Issue with Chrome related to svg getScreenCTM function

Check out the jsFiddle demo I am attempting to utilize the getScreenCTM function to retrieve the mouse position based on SVG image coordinates. It seems to work in IE and Firefox, but not in Chrome. When I define the attributes width and height in the SV ...

Receive a distinct key alert after including a key attribute to a div element containing multiple sub nodes in react version 18.2.0

When attempting to render the div element on the page, I encountered a warning stating: "Each child in a list should have a unique 'key' prop." <div {...{}} key={"formKey"}> <input type="text" /> <button> ...