Solved

browser height and keeping the scrollbar for this.

Posted on 2013-11-12
4
422 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

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

789 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