Adjust the color of the section following the footer to match the footer color or black using Bootstrap

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

Is there a way to modify the color of this element to match the footer color? I am seeking assistance on what CSS or HTML code would be necessary to accomplish this. I am working within Bootstrap 3 and have already attempted the solution provided in How to put black color in the bottom of the page after footer without success.

Here is my HTML from _Layout.cshtml:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - My ASP.NET Application</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")

</head>
<body>
    ... (content omitted for brevity)
    <footer class="navbar-default">
        <div class="container">
            <div class=”row bottom-rule”>

                ... (more content)
                
            </div><!-- end container -->
    </footer>

</body>
</html>

Site.css:

body {
    padding-top: 50px;
    padding-bottom: 20px;
}

/* Set padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

... (styles omitted for brevity)

.monospaced { font-family: 'Ubuntu Mono', monospaced ; }

Currently using Visual Studio 2015.

PS: I specifically do not want to change the background color of the body to black! – user2548663 7 secs ago

Answer №1

Experiment with changing the body’s background to a dark shade:

To modify your CSS, adjust the following section:

body {
    padding-top: 50px;
    padding-bottom: 20px;
    background: #000;
}

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

Switch the orientation of the dropdown menu from vertical to horizontal in CSS

After downloading a CSS dropdown menu from purecss.menus.com, I attempted to modify it by changing the main menu to display horizontally instead of vertically. However, I am now struggling to figure out which part of the CSS code needs to be adjusted in or ...

Why does my 'click' event listener only work for the first two <li>'s and not the others?

I am new to programming and recently achieved success with my 'click' eventListener. When clicking on the first two li elements within the ul, the class of the div toggles on and off as expected. However, I encountered an issue where clicking on ...

Tips for implementing simple custom styling within an Angular application without relying on innerHTML

Seeking advice on the best practices for a specific scenario. I am currently developing a small Angular application where users can input text. I would like to allow them to easily make certain words bold or create links. For example, if they type *whatev ...

Setting MenuItem to the correct width in asp.net simplified

I have a 1000px wide container, within it there is a menu control with 5 items (links). Each item has a width of 200px in the CSS file to make use of the entire length of the line. .level1 { border-width: 0px; margin: 0px; padding: 0px; background ...

What is the best way to create eye-catching animations on a website using either Wordpress or W

I am a newcomer to Wordpress and have recently taken on a project to create a website similar to . Upon opening the site, you can see various animations at the top. I am unsure whether these animations are created using a specific plugin or custom code. An ...

I'm looking to adjust the padding on the left and right sides of the v-select menu checkbox in Vuetify 3. How

While trying to reduce the left padding of the v-select menu checkbox using the F12 debugger, I encountered an issue where the menu suddenly disappears when clicked. This makes it difficult to see the active menu. Attached is a screenshot of the select me ...

Persistent banner designed to accompany blog posts

I've been attempting to insert a banner ad that runs along the left side of my blog post. Unfortunately, all my efforts so far have caused it to display above the content, pushing the blog post down the page. You can view the live link here. Here i ...

"Experiencing overflow issues with flex items on Firefox browser

Currently, I am working on constructing a form where the first row consists of a single text field with 100% width and the second row contains three equidistant fields. The layout works perfectly in Chrome but is experiencing overflow issues in Firefox. ...

Choose grandchildren elements within 2 tiers deep of the main div

I am currently working on a code to display 9 boxes in a layout reminiscent of a rubix cube. #child { height: 30px; width: 30px; float: left; margin: 1px; background-color: rgba(235, 26, 224, 0.829); } #outer { position: absolute; } < ...

Trouble with Google Web Fonts appearing incorrectly on Chrome for Windows 7

Currently facing an issue with a website I am developing using Wordpress: In Chrome, running on Windows 7, the body text on the homepage is supposed to be displayed as a Google Font. However, for some reason, the last line of the text is appearing in the d ...

The typical actions of the table elements

When I view my table on large screens, the TH elements are displayed at the top. However, when I switch to a mobile device, these THs move to the left side instead. Is this the default behavior of TH elements in tables? I am utilizing the 'responsive- ...

Leveraging CamanJS for canvas filtering

These are my HTML elements: <div class="wrapper"> <nav class="navbar navbar-transparent"> <div class="container-fluid"> <div class="navbar-header"> <span class="btn btn-white btn-file"> ...

Guide to retrieve Player duration, current timestamp, and video frames or Seek Position using JQuery

I have successfully managed to put together this code that retrieves player duration, current time, and calculates a value used to update the progress bar width. For Example var slideOff = Math.floor((100 / totalTime) * currentTime); progBar.css({width ...

Click to fill a CSS square using JavaScript

I am currently in the process of creating a simple habit tracker using html, css, and javascript. The design includes red squares filled with white created using div elements, and they are positioned within a container to ensure consistent spacing even whe ...

Transform HTML content with formatting into a PDF format using Google Apps Script, then bundle it with an email attachment. Generate a PDF blob directly from the

Seeking help with customizing HTML output from a Google Apps Script form to have different styles for email and PDF files. Current code: function doGet(request) { return HtmlService.createTemplateFromFile('index') .evaluate();//not al ...

Tips for preventing bootstrap from resizing the top card image too large while maintaining consistency across various image files

Hello, I'm facing an issue with bootstrap image sizing. When I insert images with smaller dimensions into a card, they are being blown up to fit the card which results in them becoming blurry. Here is the HTML code that's causing the problem: { ...

Cannot utilize Map within each loop

Below is the less code snippet: @threshold:{ a:50; b:200; }; @themes:{ a:red; b:blue; }; .mymixin(@name,@color,@thrshld){ //do-something } each(@themes,{ .mymixin(@key,@value,@threshold[@key]); }); Upon executing the code, an error message ...

Issues with message display validation in jQuery

Validation has been applied to the form, and there are div elements within the input fields with corresponding IDs. The goal is to display error messages within those divs. Specifically, if an input field is missing, the errorMessage should be set in the ...

Performing various JavaScript functions within a single hyperlink

I've implemented the Tab Content Script by dynamicdrive.com on my website. The script creates tabbed navigation, and I find it to be quite useful. Currently, I am trying to figure out how to make a single link select two tabs at once. Essentially, I ...

Tips for setting up a popup menu when clicking a button on a webpage

I am currently working on developing a popup menu with a greyed-out background that appears when the user clicks on a button in React. My code implementation is as follows: // The ifButtonClicked function is called when another button is clicked // Some ...