Solved

browser height and keeping the scrollbar for this.

Posted on 2013-11-12
4
417 Views
Last Modified: 2013-11-14
Hi there;

<div id="myDiv" style="height: 100vh; zoom: 1; overflow: auto; " runat="server">

Open in new window


I have a div as above and I want to set the height of that div with the size of user agent, IE or chrome.

But, when it's resized, I want to see the scrollbar in which overflow:auto should do the trick. But not working when I set it with vh..

Is there a way to grab and set the browser height to my div gently?

Regards.
0
Comment
Question by:jazzIIIlove
  • 2
  • 2
4 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39641942
I'm not sure I understand the question 100vh should be setting the div to 100% of the height of the viewport, and the overflow auto could generate scroll bars either vertically of horizontally if the content of the dive is larger than the viewport.

Without a link to the page it is impossible to know everything that might be affecting the rendering.  BTW vh is not support in older browsers.

Cd&
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 39643807
I may have to use this in ie8 and 9. Supported?
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 39645899
Partially support in IE9 and IE10, fully support in IE11.  Not support in IE prior to IE9

My experience with it in IE9 and IE10 is that it gets it right most of the time put gets it wrong when there is a calculation involved.

Cd&
0
 
LVL 12

Author Closing Comment

by:jazzIIIlove
ID: 39647974
Thanks. I have to ask another question, it seems.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article discusses four methods for overlaying images in a container on a web page
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

746 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

11 Experts available now in Live!

Get 1:1 Help Now