Make the slider CSS more markup agnostic (see #4600)