Had overcomplicated an aspect of the CSS which was breaking things in certain situations.