{% load static %}
<!DOCTYPE html>
<html>
<head>
  <title></title>
  <link rel="stylesheet" href="{% static 'css/main.css' %}">
  <style type="text/css">
    .container a:nth-child({{ panel.cols }}n) {
      margin-right: 0;
    }
    .container {
      width: {{ panel.total_width }}px;
    }
  </style>
</head>
<body style="background-color: {{ body_back }}">
  <div class="container">
    {% for advert in adverts %}
      <a target="_blank" href="{{ advert.get_signed_link }}">
        <img border="0" width="{{ panel.width }}" height="{{ panel.height }}" src="{{ advert.image.url }}" class="main-item">
      </a>
    {% endfor %}
  </div>
</body>
</html>
{% load static %}
<!DOCTYPE html>
<html>
<head>
  <title></title>
  <link type="text/css" rel="stylesheet" href="{% static 'css/main.css' %}">
  <style type="text/css">
    .container a:nth-child({{ panel.cols }}n) {
      margin-right: 0;
    }
    .container {
      width: {{ panel.total_width }}px;
    }
  </style>
</head>
<body style="background-color: {{ body_back }}">
  <div class="container">
    {% for advert in adverts %}
      <a target="_blank" href="{{ advert.get_signed_link }}">
        <img border="0" width="{{ panel.width }}" height="{{ panel.height }}" src="{{ advert.image.url }}" class="main-item">
      </a>
    {% endfor %}
  </div>
</body>
</html>

Set the type to text/css for firefox
Set the type to text/css for firefox
