Customized Bootstrap login form aesthetic

After implementing the login with classes from bootstrap:

<p class="h4 mb-4">Sign in</p>
<h5 class="card-header info-color white-text text-center py-4" >Sign in</h5>

I noticed that instead of having colors as shown below:

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

My logins now appear like this: https://i.sstatic.net/r0tXc.png

This issue is occurring while using Bootstrap v4.3.1 (created a new project with Visual Studio 2017).

Answer №1

If you want to change the class of white-text to text-white, add bg-primary for the background color, and include custom color code as well.

.bg-custom{
  background-color:#33b5e5 !important;
}
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1P" crossorigin="anonymous">
</head>
<h3>Default color</h3>
<h5 class="card-header bg-primary text-white text-center py-4" >Sign in</h5>
<hr/>
<h3>Custom color</h3>
<h5 class="card-header bg-custom text-white text-center py-4" >Sign in</h5>
<hr/>
<h3>With inline css</h3>
<h5 class="card-header text-white text-center py-4" style="background-color:#33b5e5">Sign in</h5>

Answer №2

Remember to utilize the bg-primary class for styling.

<h5 class="card-header info-color white-text text-center py-4 bg-primary">Sign in</h5>

Answer №3

To make the necessary adjustment, use bg-info text-white in place of info-color white-text

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<p class="h4 mb-4">Sign in</p>
<h5 class="card-header bg-info text-white text-center py-4" >Sign in</h5>

This link provides further information: link

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

When hovering over the image, it enlarges and gradually becomes transparent, unveiling the hidden text beneath

I've been struggling to achieve the desired effect for quite some time now, putting in hours of effort without success. Essentially, I am aiming to create a div that showcases an image. When the mouse hovers over the image, it should zoom in and fade ...

What is causing the floated element to overlap the element below instead of vice versa?

div { background-color: #00FFFF; } p { width: 50px; height: 50px; border: 1px solid black; margin: 0px; } #p1 { background-color: red; float: left; } #p2 { background-color: green; } #p3 { background-color: orange; } #p4 { backgr ...

Calculating the upcoming multiplier values for spacers in the Bootstrap 4 framework

Bootstrap is equipped with a range of 0-5 spacers and multiplier values between 0.25 to 3. If the goal is to incorporate spacers up to 15, what should the corresponding multiplier values be? Observing a sequence where each number is twice as much as the p ...

What steps should I take to incorporate Bootstrap's JavaScript into Vue (Gridsome)?

Check out my website: The site is built with Gridsome, a static site generator for Vue. If you navigate to the mobile version and try to open the Bootstrap Hamburger menu, it doesn't work as expected. I've followed the instructions in Gridsome ...

Utilizing Vue to connect data to Bootstrap-Vue card properties

Recently transitioned from backend development to frontend. Currently delving into the world of Vue and Bootstrap Vue. One of the challenges I am facing is dynamically populating the bootstrap card attributes such as the title. While I have the necessary ...

Navigate through PNG image - proceed only if the clicked area is transparent

Imagine having an image that looks like this: https://i.sstatic.net/Ab6aW.jpg I am looking to make it so that when I click on the transparent areas of the image, the click should pass through to the element below. However, if I click on a non-transparent ...

css issue with opacity transition not functioning properly

My website is designed to display images in a table, but some of them are Stock Photos, so I need to indicate the source. I want the source to appear when the user hovers over the picture. For this purpose, I have assigned the source tag to a class (.PicSo ...

Having trouble loading @ng-bootstrap/ng-bootstrap in Angular?

Currently, I am attempting to integrate @ng-bootstrap/ng-bootstrap with Angular and Electron while using Gulp in my project. Below is the content of my renderer.ts file: /** * Angular Module declaration */ let Brow ...

Achieving Full Row Height in Twitter Bootstrap using CSS Grid

Before jumping to conclusions and marking this question as a duplicate, I want to clarify that I have already explored all suggestions provided on Stack Overflow, including the use of display: table. Unfortunately, none of them seem to work smoothly with B ...

Can elements be prevented from resizing in relation to another element without using position:absolute?

Is there a way to prevent elements in a <div> from moving when an adjacent element is resized, without using position:absolute? Any help would be greatly appreciated. Thank you in advance! ...

Is there a way to modify the form's style to show "none" without submitting the form?

Clicking the Close button will submit the form to Lcar.php. The goal is to hide the CSS and remain on the current page after clicking the button. The issue of the form being submitted to Lcar.php when the Close button is clicked arises despite the fact t ...

Is there a way to only retrieve the exception message once within the jQuery each function?

Utilizing the "Tempus Dominus Bootstrap 4" for time manipulation has been a crucial part of my workflow. Recently, I encountered a bug while implementing a function to clear all input values upon clicking a specific button. Unfortunately, the clear funct ...

Incorporating CSS into an HTML document with Jersey/Grizzly

This is the structure of my project: src/main/java -- main.java src/main/resources -- webapp -- -- css -- -- js -- -- images -- -- pages -- -- -- home.html Currently, my Maven project utilizes Jersey and Grizzly. I am able to call my REST services and lo ...

Erase Content Inside the <div> Tag

Currently, I am employing JQUERY and CSS to modify the default content on a website. However, I have encountered the following piece of code: <div id="SortOptions"> Sort by: <select id="SortMain" class="improvedcatalogdropdown"> ...

Execute with jQuery using Multiple Attribute Selector

I am attempting to input numeric values using a keyboard. My issue is as follows: the keyboard has an "Accept" button, and I have multiple text fields. I want to assign a different action for each text field. I attempted to use multiple attribute selector ...

Unable to create circular dots within the Slick Slider widget

While attempting to create a slider with dots, I encountered an issue where the dots appeared as ellipses instead of circles, despite setting the width and height to be the same. For instance, I specified width: 12px; height: 12px; but it resulted in a sha ...

How do I center an SVG vertically inside a button using Bootstrap 5?

Is there a way to center the SVG vertically within the button while using Bootstrap for styling? <a href="#home" class="navbar-home"> <button type="button" class="btn btn-outline-warning"> & ...

Having trouble with Gulp JS and CSS minification where existing minified files cannot be replaced

I've hit a roadblock in trying to resolve my search and google issue. My current challenge involves Gulp and cssmin. I can't seem to pinpoint the cause of an error. My aim is to have both the original CSS files and their minified versions in the ...

The mobile functionality of the stylesheet is not functioning properly

Recently, I came across an issue with a stylesheet designed for mobile devices that contains the following code: /* Smartphones (portrait) ----------- */ @media only screen and (max-width : 320px) { /* Styles */ } Surprisingly, this code failed to work ...

What is the best way to apply styles to a React component that is passed as a prop?

I'm currently working on a component that is passed as a label prop. In order for me to utilize justify-content: space between within my div, I must ensure it has a width of 100%. You can see how this appears in the developer tools by clicking here. r ...