skip to Main Content
.navbar-brand{
  font-weight: bold;
  font-family: "Ubuntu";
  font-size: 2.5rem;
}
<a class="navbar-brand" href="">tindog</a>

So this is how I try to change the font-size for my link through a certain class and I came across something strange that everything has changed whether it is font-family or font-weight which means that I define the class in index.html correctly and in the css file I am doing it right!!
But the size does not change, someone explain to me what could be the problem.
THANKS!!

2

Answers


  1. I tested your code and there is nothing wrong with it. Try to change the font size using pixels instead.

    .navbar-brand {
    font-weight: bold;
    font-family: "Ubuntu";
    font-size: 40px;
    }
    

    Since 1rem = 16px.

    Login or Signup to reply.
  2. Try this code:

    .navbar-brand{
      font-weight: bold;
      font-family: "Ubuntu";
      font-size: 2.5rem !important;
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search