I have an app that I have had help with and now I’m trying to tweak it a little. I want to change my background color on a form when a record is being edited and a different background color when a new record is being added.
I tried calling the color class with this:
<div class body = background-color:bg-lightyellow>
It doesn’t work and I’m pretty sure it gets overwritten. Admittedly, I am a newbie to Django, but I am persistent. I would appreciate someone pointing me in the right direction!
Here is the form code:
{% extends ‘theme/default.html’ %}
{% block title %}{{ client.get_display_name }}{% endblock title %}
{% block content %}
{{client.get_display_name }} #{{ client.id }}
<div class body = background-color:bg-lightyellow>
{% include "clients/partials/client_form.html" %}
This is the CSS code:
CSS:
.table {
–bs-table-striped-bg: rgb(232, 250, 224);
}
.bg-lightyellow {
background-color: rgb(250, 250, 155);
}