mdbootstrap css and the invisible uncolored button

mdbootstrap css not working as expected

This document can otherwise be called btn-success vs btn_success Bootstrap css. This is because, a simple oversight resulted in a confusion that left our imagination flying at the speed of a mythical spaceship.

Recently, we were working on a page, where certain page elements were to be painted dynamically in the course of the program.


CSS not updating cell as expected

When the program was run, the color of the cell did not change. On analysis, we found the css class to be present in the code. But, the change did not reflect when the page was rendered. It was quite a confusing situation indeed.

But, after many rounds of analysis, we found out the problem to be an innocuous "_" symbol. Instead of "-" it was found to be an underscore "_".

btn-success explained

To put it simply, the class that we called was btn_success,  whereas what we should have called or referred to would have been "btn-success".

Notice that the character "_" in place of "-". Though they seem similar, it is easy to overlook them when they are part of a larger group of words, in this case, a program.

We are recording it here so it may be useful to another set of desperate souls who want color in their mdbootstrap css.


btn-success In a nutshell

btn-success is a bootstrap class, which highlights the cell green. If you use btn_success instead of btn-success, your cell will not be highlighted in green.

Usage of btn-success

 

In the above example, a ? is displayed with in a button, which has the background color green.

No comments:

Imagen 3: A New Era of AI Image Creation?

  Google has just unveiled Imagen 3, the latest iteration of their Gemini AI. They're making bold claims about enhanced image quality, ...

Most Popular

Copyrighted.com Registered & Protected DWYE-NHTO-NBNH-7FFM