What is the method for altering the text color in a password reset form?

After updating my password reset form in Django, I customized the background color to black and the text color to white. However, the help text still remains black, as shown in this image: https://i.sstatic.net/jhXqV.png

I've attempted various methods like assigning CSS styles with a white color, using IDs with JavaScript, and even trying setProperty(), but the text stubbornly stays black.

Here's a snippet of my template:

{% extends "base.html" %}
{% load static %}
{% load crispy_forms_tags %}

{% block title %}Password change{% endblock %}

{% block styling %}
    <link rel="stylesheet" href="{% static "styly_main.css" %}">
    <style>
        body {
            background-color: #192444;
        }
        .c2 {
            max-width: 280px;
            background-color: black;
            color: white !important;
            border: black solid 1px;
            border-radius: 6px;
            padding: 1rem;
            padding-bottom: 1.25rem;
            margin: 1rem;
            text-align: center;
            margin-left: auto;
            margin-right: auto;
        }
        .container {
            max-width: 350px;
            min-width: 340px;
        }
    </style>
{% endblock%}

{% block content %}
    <div class="container-fluid overflow-hidden">
        
        {% include "includes/header_main.html" %}

        <div class="container c1">

            <div class="row gx-1">
                <div id="id1" class="col text-center pb-2 pt-3">
                    <H3>Password change</h3>
                    
                    <form method="post">
                        {% csrf_token %}
                        <div class="c2">
                            {{ form|crispy }}
                        </div>
                        <p>
                            <button type="submit" class="btn btn-dark"><i class="fa-solid fa-floppy-disk"></i>  Submit</button>
                        </p>
                    </form>
                    
                    <p>
                        <a href="{% url 'index' %}" class="a2">Back to Home.</a>
                    </p>
                </div>
            </div>

        </div>

        {% include "includes/footer.html""%}

    </div>

{% endblock  %}

{% block script %}

<script>

const id1Elm = document.getElementById("id1");
id1Elm.style.setProperty('color', 'white', 'important');


</script>

{% endblock script %}

Any suggestions on how to update the color of the help text?

Answer №1

To change the text color of all fonts within the black block to white, use this class:

.container.c1 * {
    color: #fff;
}

For a crisper look when using bootstrap, apply the following class:

.alert,
.alert-danger,
.alert-danger .alert-link {
  color: #fff;
}

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

CSS - Maximizing One Column's Width While Allocating Percentage Space for Two Columns?

It's been quite some time since I delved into the world of web development and I seem to have forgotten how to tackle this particular issue. Despite hours spent searching online, I've gained knowledge about flex-boxes and other useful tools, but ...

Registering components globally in Vue using the <script> tag allows for seamless integration

I'm currently diving into Vue and am interested in incorporating vue-tabs into my project. The guidelines for globally "installing" it are as follows: //in your app.js or a similar file // import Vue from 'vue'; // Already available imp ...

A guide to accessing the sibling of each selector with jQuery

Imagine you have the following HTML structure: <div class="parent"> <div class="child"></div> <div class="sibling">content...</div> </div> <div class="parent"> <div class="child"></div> <div ...

When I try to install dependencies with Hardhat, the "Typechain" folder does not appear in the directory

After installing all the dependencies, I noticed that the "typechain" folder was missing in the typescript hardhat. How can I retrieve it? Try running npm init Then, do npm install --save-dev hardhat Next, run npx hardaht You should see an option to se ...

Apache failing to serve Django on port 443 in an AWS environment

I am currently facing challenges in configuring my Django app to serve over HTTPS. I am not very familiar with Apache configurations, so I am struggling to put all the pieces together. Hopefully, someone can help me identify what might be a simple oversigh ...

Selecting multiple options in a dropdown menu in React Bootstrap

I'm currently working on incorporating a multi-select feature (similar to select all and deselect all) in a React Bootstrap dropdown menu. <Dropdown> <Dropdown.Toggle variant="success" id="dropdown-basic"> Dropdow ...

Give an npm package a nickname using a browserify shim

I'm in the process of transitioning from requirejs to browserify. One of the dependencies I have is for masonry. Trying to shim it using the bower version was proving to be a little challenging (more on that can be found here). Instead, I decided t ...

the reason for the blurring of shadows in Three.js

Typically, the shadow appears as shown below: https://i.sstatic.net/5L9N2.png However, upon adjusting the parameters of directionalLight.shadow.camera directionalLight.shadow.camera.left = -50 directionalLight.shadow.camera.right = 50 directionalLight.s ...

What is the best way to position items of varying heights in alignment?

Can someone help me with this issue? I have a grid with 12 columns, each containing 2 identical icons and 2 texts of different heights. I need to align the icons in the center and make sure the texts are at the same height, but I'm having trouble achi ...

The immutability of TypeScript's `as const` compared to JavaScript's Map object

Let's delve into a straightforward example: const simpleObject = { one: 'one', two: 'two', three: 'three' } Historically, pre ES2015 objects did not guarantee the preservation of key order upon retrieval. However, ...

"Exclusive Mui sx styles will be applied only when a specific breakpoint

As I update my old mui styling to utilize the sx attribute, I've noticed the ability to specify styles for different breakpoints using sx = {{ someCssProp: { xs: ..., md: ... and so on. Prior to this, I had been using theme.breakpoints.only for some ...

Question about React.js: What is the best way to add multiple classes to a component by using a ternary operator?

I am looking to apply multiple classes to a component by utilizing a ternary operator. In our shared ts theme file, we have the general button styles defined, but for this specific component, I want to adjust the sizes based on screen width. To achieve thi ...

Contrasting the functionality of multidimensional arrays and implementing a property to each individual element, extending to all levels of nested

Currently, I am tackling the permission aspect of my application. The scenario involves developing a Vue application that receives data from a Laravel backend created by another individual. My current challenge lies in determining whether a permission is c ...

Experimenting with Selenium to automate processes involving dynamic class attributes

My issue involves a Button class = "searchbar__SearchButton-sc-1546roh-3 searchbar__CancelButton-sc-1546roh-4 glEceZ" I am attempting to locate this element in the browser using return browser.element('button[class^="searchbar__CancelButton-"]&ap ...

Adjust the hue of a Three.js world map

Check out this awesome Three.js demo with a 3D Globe: I've been trying to modify the color of the globe from black to navy blue, but despite my efforts in editing the source files, I haven't been successful in changing its appearance. My unders ...

A guide on implementing a callback function with the iTunes search API

I am having trouble setting up a callback function to effectively utilize the iTunes Store search API. My goal is to achieve the following behavior: const getiTunes = fetch(`https://itunes.apple.com/search?term=${search}&media=movie&limit=200`) ...

Using CSS to create hover effects for specific classes of elements

Is there a way to make the button change color on hover when hovering over anywhere in the navigation bar (.topNav) instead of just when hovering over the individual button elements (.top, .middle, .bottom classes)? I tried using span to achieve this, but ...

Storing JSON data in an array is a simple process that involves converting

Currently, I am working on implementing dependent dropdowns using JavaScript. The dropdowns include country, state, and city, with the data sourced from the JSON data provided below. My goal is to organize the data in such a way that countries are stored ...

Pressing ctrl+s will submit TinyMCE+JEditable

Updated: June 8th, 2011 Please check out the solution provided in the Answer section below. Updated: May 5th, 2011 I am currently facing a challenge where I need to trigger the JEditable submit button after hitting Ctrl+S. Thariama has already demonstr ...

Troubleshooting problems with ng-repeat integration in Bootstrap and AngularJS

I am currently in the process of developing an application using Bootstrap and AngularJS. One issue I have encountered involves using ng-repeat within a col-md-3 to list products. The challenge lies in wanting to incorporate a collapse feature into the gri ...