?
Solved

Make Div 100% height even when scrolling

Posted on 2014-09-06
3
Medium Priority
?
513 Views
Last Modified: 2014-09-19
Hi

Im having problems making an overlay div 100% height of body.
When you scroll down it stops. The ovelay is positioned absolute

How can i make it 100% height? I dont want to use position fixed because then i cant scroll dowon to see all content on the overlay?

Click "login" on this link to see overlay:
http://dev.openwaterdesign.com/channel/

Thanks
0
Comment
Question by:coolispaul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 25

Accepted Solution

by:
Kyle Hamilton earned 2000 total points
ID: 40307548
you have to make the overlay the height of the document, not the window, adjust your javascript:

$(document).ready(function() {
	$(".login").click(function() {
			//console.log(2);
	        var height = $(document).height();
		$(".overlay").css({"height": height}).fadeIn();
	});
	$(".close-link").click(function() {
		$(".overlay").fadeOut();
	});

});

Open in new window

0
 

Author Comment

by:coolispaul
ID: 40307550
great thanks that works

Is there a way to do this with css?

Ta
0
 
LVL 25

Expert Comment

by:Kyle Hamilton
ID: 40307557
np. and, not really.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question