Click here to Skip to main content
14,976,129 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CSS
.big-font {
    font-size: xx-large;
}


HTML
<a class="btn btn-secondary flex-fill big-font">@item</a>


No matter what I pick, font size is always the same (relatively small).

What I have tried:

Googling for CSS attributes but nothing ever changes.
Posted
Updated 19-May-21 3:45am

1 solution

You seem to use Bootstrap.

If you include Bootstrap after your own styles your .big-font style will be overriden by Bootstrap e.g.
<style>
    .big-font {
        font-size: xx-large;
}
</style>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

<a class="btn btn-secondary flex-fill big-font">@item</a>

You should then change the order e.g.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<style>
    .big-font {
    font-size: xx-large;
}
</style>

<a class="btn btn-secondary flex-fill big-font">@item</a>
   

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