Questions tagged [height]

The property which determines the size of an object on the Y-axis. Please don't use this tag, it has no taxonomic value in your post.

The property which determines the size of an object on the Y-axis. Most likely, it has no taxonomic value in your post, and you should not be using it. Consider e.g. , or .

6209 questions
67
votes
6 answers

How do I get the height of a div's full content with jQuery?

I am trying to create my own scroll bars. I have tried most of the jquery scrollbar plugins and none of them seem to work for me, so I decided to create my own. I have an overflow area with scrollable content. I can get the scrollbar to work if I am…
mtlca401
  • 1,413
  • 4
  • 16
  • 24
66
votes
8 answers

Android: get height of a view before it´s drawn

For an animation I need to know the height from a View. The Problem is, that the getHeight() method allways return 0 unless the View is drawn. So is there any way to get height without drawing it? In this case the View is a LinearLayout. EDIT: I…
anonymous
  • 1,141
  • 3
  • 11
  • 20
65
votes
14 answers

How do I size a UITextView to its content on iOS 7?

I've been using the accepted answer here for years. On iOS 7, the contentSize.height becomes the frame.height-8, regardless of text content. What's a working method to adjust the height on iOS 7?
Henrik Erlandsson
  • 3,797
  • 5
  • 43
  • 63
64
votes
8 answers

Change UITableView height dynamically

I want to change the height of my tableview from another viewcontroller based on the sum of its cells' heights, as they are dynamic. Is it at all possible? Thanks Add-on: What I basically have is a UserProfileViewController that has a containerview…
alex
  • 957
  • 2
  • 9
  • 16
63
votes
9 answers

When Can I First Measure a View?

So I have a bit of confusion with trying to set the background drawable of a view as it is displayed. The code relies upon knowing the height of the view, so I can't call it from onCreate() or onResume(), because getHeight() returns 0. onResume()…
Kevin Coppock
  • 133,643
  • 45
  • 263
  • 274
61
votes
4 answers

How to get a button's height to match another element's height?

I want to put a button next to a EditText and I want their heights to match. For example, from the built in Android browser: The Go button is the same height as the EditText field. I know I could wrap both these views in a parent layout view, and…
cottonBallPaws
  • 21,220
  • 37
  • 123
  • 171
60
votes
3 answers

jQuery web page height

Let's say that a web page is twice the height of the browser window (thus there's a scroll bar). How do I retrieve the height of the web page in jQuery?
core
  • 32,451
  • 45
  • 138
  • 193
58
votes
7 answers

CSS height 100% percent not working

I have a div with height: 100%; but it's not working. When I declare a fixed height (for example height: 600px;) it is working, but I would like a responsive design. html:
Pavel Sládek
  • 583
  • 1
  • 4
  • 6
57
votes
4 answers

Set div to remaining height using CSS with unknown height divs above and below

Is it possible to make the wrapper fill the window height (no scrolling) and the center div scrollable without messing around with pixels and javascript?

Header

high…
danial
  • 4,058
  • 2
  • 32
  • 39
57
votes
2 answers

Set iframe content height to auto resize dynamically

I was myself searching for a simple solution to change the height of an iframe with the content in it. It seems like the rules are that you can't get the height of the iframe from the page holding it. This is because of security apparently. How can…
Paul
  • 597
  • 1
  • 6
  • 8
55
votes
10 answers

JavaScript - Get Browser Height

I am looking for a code snippet to get the height of the viewable area within a browser window. I had this code, however it is somewhat bugged as if the the body doesn't exceed the height the of the window then it comes back…
ComputerUser
  • 4,828
  • 15
  • 58
  • 71
53
votes
13 answers

What is the height of iPad's onscreen keyboard?

I'm looking for two numbers here: the height in portrait and the height in landscape. Don't answer in cm or inches, but rather in pixels.
Erik B
  • 40,889
  • 25
  • 119
  • 135
53
votes
5 answers

Set div height equal to screen size

I have a div element in twitter-bootstrap which will have content that will overflow vertically outside the screen. I would like the div to take the height of the size of the browser window and let the rest of the content scroll vertically within…
Anand Sunderraman
  • 7,900
  • 31
  • 90
  • 150
52
votes
4 answers

overflow:hidden on inline-block adds height to parent

I'm certain this has been asked before in some form or other, but I just can't find an answer.. I have some nested divs
A
And the child has display:inline-block and overflow:hidden .parent{ …
stralsi
  • 988
  • 1
  • 10
  • 17
51
votes
5 answers

css - min height by number of lines

I think I already know the answer to this one, but i hope maybe someone will have a some neat trick for that . I want to specify a min-height of a DIV , but not px / % based . (I know it sounds strange , but it is for compatibility reasons /…
Obmerk Kronen
  • 15,619
  • 16
  • 66
  • 105