The CSS code is failing to update the text color

My latest project involves using Bootstrap4 to create a greenfooter div, which includes a container with four columns for organization. However, I seem to have run into some issues when it comes to styling the text within this setup.

In particular, I wanted to change the color of the H5 element to a lighter shade of green and make the links white with a lighter green color on hover. Unfortunately, my CSS code doesn't seem to be working properly, and I suspect there might be an error in my implementation. Can anyone spot where I've gone wrong?

html

    <div class="w-100 g-py-30 greenfooter">
        <div class="container">
            <div class="row">
            <div class="col-md-3">
                <h5>McDowell Technical<br>
                Community College</h5>
                <p>54 College Drive<br>
                  Marion, NC 28752</p>
                <p>
                <a href="https://www.google.com/maps/place/McDowell+Technical+Community+College/@35.6555866,-81.9620476,15z/data=!4m5!3m4!1s0x0:0xf42cd81f2a7dd3ec!8m2!3d35.6555866!4d-81.9620476" target="_blank" class="g-color-white">Get Directions</a> </p>
                <h5>call: 828-652-6021 </h5>
            </div>
            <div class="col-md-3"></div>
            <div class="col-md-3"></div>
            <div class="col-md-3"></div>
            </div>
        </div>
    </div>

css

    .greenfooter {
        background-color: #5C8627;
        color: white;
    }
    .greenfooter.container.row.col-md-3 h5 {
        color: #C8E72F;
    }

    .greenfooter.container.row.col-md-3 a {
        color: #ffffff;
    }

    .greenfooter.container.row.col-md-3 a:hover {
        color: #C8E72F;
        text-decoration: none;
    }

Answer №1

In the HTML structure, the container is a child of the greenfooter class element, which means that a space is needed to connect them. The same concept applies for row, col-md-3, and h5 elements.

.greenfooter {
    background-color: #5C8627;
    color: white;
}
.greenfooter .container.row.col-md-3 h5 {
    color: #C8E72F;
}

.greenfooter .container .row .col-md-3 a {
    color: #ffffff;
}

.greenfooter .container .row .col-md-3 a:hover {
    color: #C8E72F;
    text-decoration: none;
}

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

Highlighting a Table Column with a Radio Button

I am struggling with controlling the highlight of a table using only radio buttons. When I try to change the selector to input:radio, it doesn't work as expected. It seems to only work with the selector provided in my code snippet. $("th").on("clic ...

Using weasyprint to convert a single HTML page into a PDF

I have encountered a challenge while attempting to convert an HTML page with a single table (containing images or text in the td elements) to a PDF using the Python module weasyprint. The issue I am facing is that weasyprint is inserting page breaks withi ...

Bulma's Grid System Spans Columns Across the Entire Viewport

Utilizing the Bulma CSS framework. In my attempt to arrange some elements, I am puzzled as to why, in a desktop view, the items do not transition to the next row once they exceed the viewport. Below is a snippet of code along with a link to a JS Bin exam ...

Fixing issues in PHP File Editor

At our web development company, we have created an online file editor and file manager script for our website users to easily manage their files and customize their templates. This script is written in PHP and allows users to edit html, text, php, js, jque ...

Transferring data from local storage to a PHP server using AJAX

My attempt to transfer data from local storage to PHP using AJAX resulted in an error mentioning 'undefined index data'. chart.php <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script type="t ...

Center elements both vertically and horizontally by utilizing Bootstrap flexbox

Having delved into the documentation of Bootstrap 4 Flex, I am facing difficulties in making the "align-item-center" property function as desired. Despite trying various examples found online, I am unable to alter the vertical alignment of elements. This s ...

Finding results in AngularJS by typing at least 4 characters into the input field

I am using a MySQL database to search with AngularJS. How can I set it up so that the search only triggers when at least 4 characters are inputted? Here is the HTML code: <div class="search"> <form action="" method="post" class="searchform" &g ...

Tips on maintaining the initial section of collapsible div open in AngularJS

I have a collapsible section in my AngularJS application that can be expanded by default using a JSON array in the script.js file. However, I am looking for a different way to keep it open without relying on JSON data. Below is the sample code: https://p ...

I am currently working on a one-page website that will feature both a Careers form and a Contact Us form. However, I am facing a challenge with the submission

I am currently working on integrating Careers FORM and Contact Us FORM into a single page website. However, I am facing an issue with the form Submit Buttons. The problem arises during validation of the input boxes. How can I differentiate between the two ...

React JS progress circle bar is a simple and effective way to visualize

Currently, I am in the process of developing a progress circle bar that will function as a timer alongside sliders. Each slide is intended to have its own corresponding progress bar. While I have managed to create the bars individually, I am facing challe ...

Struggling to achieve the desired vertical text alignment in a React Native layout

I am in need of assistance with a follow-up question related to my issue. I have a specific layout that I would like to use as a component, but I am struggling to make it more square-shaped using CSS in React Native. Can someone provide guidance on how to ...

Update the style of elements on each iteration in Symfony2

I have implemented a collapsible CSS page for FAQs. While static text works fine, I am fetching questions and answers from the database which is causing an issue. In its standard CSS version, the collapsible FAQ appears as follows: <div clas ...

jquery selector targeting a select optiongroup that contains a specific label value

In my code, I have a select multiple with option groups: <select _ngcontent-oeq-14="" class="form-control" id="category-select" multiple=""> <optgroup label="grocery products"> <option>meat</option> <option>dai ...

Update the CSS styling for elements that are dynamically added to the page using the

Just started using jQuery for the first time and I'm encountering an issue. I'm trying to load content from an external element onto my page, and while it loads correctly, I'm having trouble using normal traversal methods on the loaded eleme ...

When linking to a section, the Bootstrap navbar obscures the top part of

I have been working on my inaugural website for educational purposes and encountered the following issue: Every time I try to link to a specific section on the same page, it opens as intended but the top portion is obscured by the navbar. <body data-s ...

Displaying a different background color on a colgroup element in CSS when a scroll is

My webpage contains one or more large and complex tables, where I use JQuery to add background-color to tr and colgroup elements when hovering over the table(s). An issue arises when there are multiple tables on a page that extends beyond the viewport wit ...

What are some creative ways to customize radio buttons using images?

I am looking to customize the appearance of my radio buttons by using images for both selected and unselected states. Here is the CSS code I have implemented: input[type="radio"] { background: url("https://example.com/path/to/unselec ...

Having difficulty with the rendering of a backbone.js collection view. Encountering an issue where I am receiving an error message: "Uncaught TypeError: Cannot call method 'on' of undefined" within my

I'm currently learning backbone.js and I can't seem to figure out why my view is showing up as undefined on line 67 of coupons.js. I've included a gist since the files are quite lengthy. Another issue I'm facing is that if I refresh th ...

Create professional and polished email content by utilizing HTML formatting techniques

I'm having trouble formatting the email body with line breaks in mind, and I'm using the following code: <a href="mailto:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="50233f3d353f3e35103528313d203c357e333f3d"> ...

Automatically integrating Nivo Lightbox into your website

I incorporated Nivo Lightbox into my website, seamlessly integrating all images with the plugin using the following code: <div class="portfolio-item"> <div class="portfolio-thumb "> <a class="lightbox" data-lightbox-type="ajax" title="Strat ...