?
Solved

browser height and keeping the scrollbar for this.

Posted on 2013-11-12
4
Medium Priority
?
426 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
[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
  • 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 2000 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

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

777 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