Solved

Make Div 100% height even when scrolling

Posted on 2014-09-06
3
506 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 500 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

Technology Partners: 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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

691 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