Are you 100% sure the code in your main view (i.e. not the conditional code) is properly setting the offset value? Have checked the value in chrome inspect tools to see if this is getting overridden by some other css with higher specificity?