Home › Forums › CSS › Hiding page content under fixed div › Reply To: Hiding page content under fixed div
July 1, 2017 at 11:41 pm
#256357
Participant
Im not sure what you want to happen to the content box once it hits the orange header (display:none; for content doesn’t seem right to me), but have a look at the JavaScript in this article http://blog.fofwebdesign.co.uk/41-add-classes-to-an-element-when-scrolled-into-viewport
You can use it to apply a new class to the content box when it reaches the header (150px from top should do it; a combined total of the header’s height and margin-top). Then, define new styles against the new class so that the content box does whatever you want.