Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good day to all, I wanted to give a link some kind of decoration by using bootstrap's label label-danger class but I dunno it does not work. Here is the code: <h2><a href="/category/{{$cat->id}}" class="label label-danger">{{$cat->TypeOfAccounting}}</a></h2>

What I have tried:

Tried to use outside of card class but all the same
Posted
Updated 7-Jul-20 4:23am

The fact that you've mentioned the card class suggests that you're using Bootstrap 4.

The label-danger class was part of Bootstrap 3. In Bootstrap 4, you should use badge badge-danger instead.

Labels and badges - Migrating to v4 - Bootstrap[^]
 
Share this answer
 
hello
why don't you try style and not bootstrap class?

.label {padding:3px;border-radius:3px;font-size:14px;}
.label-danger {background:red;color:white;}
 
Share this answer
 
v2
Comments
CHill60 8-Jul-20 6:07am    
Probably because bootstrap will dynamically adjust depending on device, screen size, screen rotation etc etc etc.
This is a little bit like saying "why hire a car when you already have a bicycle" and there is a 500 mile journey ahead

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900