Why does the template layout look wrong?