Sunday, January 01, 2017

CSS table bleg

I have undertaken the somewhat humorous project of writing and x86 assembly language interpreter in Python. The purpose is to allow my operating systems students (and ultimately any other students) to get a "light" introduction to assembly language without having to actually Ron an assembler, learn an assembly language debugger, etc. I am putting it up as a webpage using Django.

Although you would think writing the interpreter would be the hard part of the project, I am finding that getting CSS to behave properly may be far harder. In particular, I put up a table intended to display the values of the x86 registers. The table shows up like this:

My question is "What the heck?" Why is the first column getting so much space compared to the second? I have tried setting the colspan on the second column to two, and then to four, and yet the first column still eats up 85% of the table. I don't see anything in the CSS file that should cause this to happen.

Any ideas on what is going on?


  1. This style is the culprit:

    .dashboard .module table th {
    width: 100%;

    I don't know why Django admin uses this as the default style for table headers, but you can override it with your own style(s) to set the column widths to whatever you like.

    1. Thank you Matt!

      I had a copy of the admin style.css, and I yanked out almost all of the table stuff trying to fix this, but I was afriad to take out those lines, because I didn't know what "dashboard" was all about.


Mises on Immigration

Hat tip to Mr. Karaoke himself: "Mises does recognize that peaceful cultural and political assimilation can take place 'if the i...