I have a django table that's supposed to display the contents of each field of a model called Resource I wrote it like this, with results being a part of the contexts dictionary and simply containing filtered Resource objects.
<table style="width: 70%;">
<tr>
<th>Title</th>
<th>Author</th>
<th>Country</th>
<th>Description</th>
</tr>
{% for resource in results %}
<tr>
<td><a href="{{ resource.link }}">{{ resource.title }}</a></td>
<td>{{ resource.author }}</td>
<td>{{ resource.country }}</td>
<td>{{ resource.description }}</td>
</tr>
{% endfor %}
The basic html table that created currently gets to dimensions of around 1500 x 3200. Pretty big, but that's not because my monitor is big or something like that. As a matter of fact, even if I had the css style set as width: 70%
attribute or anything of that sort, the dimensions of the table do not change.
If I get rid of the following line, <td>{{ resource.description }}</td>
which is supposed to display the Resource model's textfield known as "description", however, then then I can actually customize the width of the table and prevent it from being so long.
I need to be able to shorten the width of the table, and particularly this field. What can be done?