hissroth
hissroth

Reputation: 251

Css doesn't apply on a button

I want to apply a yellow color to a button on my page, but when I call the class, it didn't apply on it and when I inspect the element on the site, it doesn't show the class I'm calling. The html code:

<a style="margin-right:30px" href="{% url "layer_quarantine" %} class="btn btn-warning pull-right">
        {% if LANGUAGE_CODE == "fr" %} Couches en attente {% else %} Layers in stand-by {% endif %}</a>

and here is the CSS:

.btn-warning {
  color: #fff;
  background-color: #ff8f31;
  border-color: #ff8118;
}
.btn-warning:focus,
.btn-warning.focus {
  color: #fff;
  background-color: #fd7300;
  border-color: #974500;
}
.btn-warning:hover {
  color: #fff;
  background-color: #fd7300;
  border-color: #d96300;
}
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
  color: #fff;
  background-color: #fd7300;
  border-color: #d96300;
}

and the view on the button: enter image description here

Upvotes: 0

Views: 69

Answers (1)

Every Screamer
Every Screamer

Reputation: 530

Close properly the a href="" :)

your code:

<a style="margin-right:30px" href="{% url "layer_quarantine" %} class="btn btn-warning pull-right">

working code:

<a style="margin-right:30px" href="{% url "layer_quarantine" %}" class="btn btn-warning pull-right">

Upvotes: 5

Related Questions