Solved

Make Div 100% height even when scrolling

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
dynamic created check uncheck boxes 6 42
How to escape unsafe HTML tags 4 36
Validating Date 4 29
Check input text, Number 7 35
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
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…

733 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