JQuery (possibly) horizontally lock an element but scroll vertically

I know that I saw it somewhere, but I can not find it anywhere.

Basically, I have a side scroller (here: http://www.allisonnavon.com ) that I collect.

The main problem is that the browser window is a bit too large in height, the site will scroll vertically and close the title that needs to be fixed.

I suppose another possibility is to automatically resize the images if the window height does not match the site, but I want to avoid this if I can. Thanks.

0
source share
1 answer

Here is a quick and dirty solution add the following class to your css

.shader {position:fixed; width: 100%; height: 160px;background: #F9F6E5; top: 0px;left: 0px;} 

and the width of the div of this class immediately after opening the container div

 <div class="container"> <!--add this --> <div class="shader"></div> <!--end add --> <!-- text and image --> 
0
source

All Articles