Questions tagged [outerheight]
37 questions
8
votes
1 answer
Mobile - iOS - Safari - window.outerHeight returns 0
I am having an issue with window.outerHeight.
It returns 0 when run on the Safari browser on mobile. I have tested it on Android (Chrome) and it works fine.
I am on iOS9.
I want to know if there is a solution or an alternative that is supported on…

Paddy
- 1,175
- 1
- 14
- 23
6
votes
2 answers
JQuery outerHeight() return none-zero on hidden (display:none) element?
I think it should return 0 for display:none elements. but it doesn't, at least for 1.10.1
alert($('#a').outerHeight(true))
http://jsfiddle.net/pUuAz/

user2665846
- 63
- 1
- 3
3
votes
2 answers
jQuery .outerHeight() on an element returns incorrect size on orientation change
I am trying to get the outerHeight of my top navigation bar on my website for some calculations and it works perfectly when loading/reloading the webpage. However, it returns the wrong height when I change the orientation of the screen in Chrome…

nosh
- 620
- 3
- 14
- 50
3
votes
2 answers
get outerHeight of class and take the biggest value
I use .outerHeight to set the height of another div, using a class as selector.
var $example = $('.example');
var $height = $example.outerHeight();
var $styles = { 'height': $height }
$('.wrapper_sub').css($styles);
I want to use this on multiple…

Marian Rick
- 3,350
- 4
- 31
- 67
3
votes
1 answer
jQuery outerHeight() Bug - Doesn't work properly below ver. 1.8.3
So I have a script that equalizes the heights of other elements on it's x-axis. The script works great... but only when I'm using jQuery 1.8.3+. The problem seems to be due to the outerHeight() function.
I've tried to find out what kind of updates…

norsewulf
- 511
- 6
- 21
2
votes
0 answers
Jquery's height() method is not returning the correct height of the div on rendering for the first time
I am working on adapt e-learning framework and I am trying to center align the notify-popup(div) vertically. For this I set top margin through js which requires the height of notify-popup, so I get its height using $('.notify-popup').height(true).…

Aashu.M
- 75
- 11
2
votes
1 answer
Centering elements with margin/padding using .outerWidth()/.outerHeight(). Function returns different values for margin and padding
i am attempting to center elements both laterally and vertically in their parent elements by calculating the difference in width and height of parent and child element and the using difference as either margin or padding.
I am calculating the…

Frederick M. Rogers
- 841
- 4
- 14
- 37
2
votes
1 answer
jQuery: When to query new outer height after CSS change?
If I do
var theHeight;
element.css('min-height', h);
theHeight = element.outerHeight();
in Chrome I get the old outer height.
I have to do
var theHeight;
element.css('min-height', h);
setTimeout(function() {
theHeight = element.outerHeight();
},…

ideaboxer
- 3,863
- 8
- 43
- 62
2
votes
1 answer
Apply the following formatting unless the viewport is smaller than the container div - Jquery
I am trying to create the following in Jquery, what I am trying to do is apply formatting to a div ONLY if the viewport is BIGGER than the .container div. I have written the following but I am not sure if I have done it correctly as my Jquery isn't…

Iain Simpson
- 8,011
- 13
- 47
- 66
1
vote
1 answer
Problems in getting elements outerHeight in IE Edge using jQuery
I have a couple of elements inside a preview
. I need to add up their outerHeights (NOT the total height of the preview
). If height of elements reaches e.g. 300px, I need to trigger some action.
Firefox and Chrome are doing this well. IE…

Jimbo Jambo
- 29
- 4
1
vote
1 answer
Chrome: window.innerHeight is equal to window.outerHeight? Why?
I have JS which opens a new window using window.open. The size of the window is set in the windowFeatures string passed to the open function.
here is how the string looks at run…

Arijit Kanrar
- 451
- 3
- 15
1
vote
4 answers
Finding the Height in jQuery
I'm just trying to learn jQuery and JavaScript. I am starting to get concepts and I feel like real world issues are the best ways of learning.
I downloaded the One Page Wonder Bootstrap template and I'm just trying to find the outerHeight of the nav…

Mitchell
- 111
- 15
1
vote
3 answers
summing outerHeight with padding gives wrong result
i want to sum the outerheight() value of a div with the padding-top value of another div. here's my function
var headerHeight = $('header').outerHeight() + "px";
console.log(headerHeight);
var containerPT =…

valerio0999
- 11,458
- 7
- 28
- 56
1
vote
4 answers
jQuery wrong outerWidth() and outerHeight() after resize()
HTML
CSS
.element
{
background: #eee;
border: 1px solid #ccc;
font-size: 24px;
margin: 10px;
padding: 20px;
position:…
I want to center this element vertically and horizontally.

user557108
- 1,195
- 3
- 17
- 26
1
vote
0 answers
Faults in jQuery measuring height at great numbers?
I've 'solved' the problem I have encountered, yet it's still quite strange and the solution is hacky. On my site I've got pages that are sometimes a few thousands of pixels large, such as…

Sjerp van Wouden
- 41
- 7