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
Solved

Make Div 100% height even when scrolling

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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
alert(innerHTML); 8 32
Css regex 6 38
ability to create nested list on the UI using PHP, HTML, Javascript 7 45
Opening a new tab in IE using Powershell / HTML 2 21
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

829 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