[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

browser height and keeping the scrollbar for this.

Posted on 2013-11-12
4
Medium Priority
?
427 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

650 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