html - Make overflow-auto only for the last part of the page -


i have page consist of 2 parts: first part can of various height , second part should take other size of visible page. height of elements inside of second part can big , part should scrollable.

the closest thing came this fiddle, problem using fixed height of second element:

.images{     overflow-y: auto;     height: 350px; } 

one more time: not know height of first part, can not use height: 20% first one, , height: 80% second.

any idea, how can fix it?

add following jquery code:

var windowheight = $(window).height(); var headerheight = $('.header').height(); var imagesheight = windowheight - headerheight; $('.images').height(imagesheight); 

don't forget include link main jquery in page:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> 

you may keep in <head> section.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -