Fix css parsing

I fixed the CSS issues described in #102 and probably also in issue #108
It still has some problems recognizing the ```<figure>``` tag, but it is a different problem that lies elsewhere.