Reputation: 2363
so the submit button looks like this:
<input type="submit" id='register_submit' class= value="{% trans 'Submit' %}" /></div>
and normall I would use a class to specify what the button looks like, but this has its own class that I cannot touch. What can I do here to give it a new class so I can customize the button?
Upvotes: 0
Views: 1663
Reputation: 25675
An option would be to override the existing rule with a specific rule. So, if your output HTML is:
<input type="submit" class="django-submit" />
You could wrap it to end up with:
<div class="my-button">
<input type="submit" class="django-submit" />
</div>
And then use your .my-button
class to create a more specific CSS rule:
.my-button .django-submit {
padding: 5px;
color: #fff;
background: #f00;
}
The following demo shows how the specific rule will override the generic rule.
Upvotes: 3
Reputation: 7761
You could give the button a style
attribute which will always take precedence over any class
attribute.
Upvotes: 0