Make html tables fixed size with css

My Djangp app output data like this in the template:

{% for mydata in mydataset %}
<table class="mytable">
          <th style="width=50%;">Column 1</th>
          <th style="width=50%;">Column 2</th>
{% for data in mydata %}
          <td>{{ data.attr1 }}</td>
          <td>{{ data.attr2 }}</td>
 {% endfor %}
{% endfor %}

The thing is I want to make all my html tables keep a certain size even when the content inside the cells may vary. Here is the trick I'm using:

table.mytable {
    table-layout: fixed;