Solved

Make Div 100% height even when scrolling

Posted on 2014-09-06
3
488 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
  • 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now