Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Css: Different height values between browsers

Posted on 2016-08-12
2
Medium Priority
?
89 Views
Last Modified: 2016-08-12
$("#someId").outerHeight()  returns different values in FF and Chrome.
I have both browsers at Ctrl-0 (default size).
What other variables are there, given both are rendering the same page with the same code?
0
Comment
Question by:renisenbb
2 Comments
 
LVL 5

Assisted Solution

by:Manuel Flores
Manuel Flores earned 1000 total points
ID: 41754452
Try this;

$(window).load(function() {
    setTimeout(function() {
        // all the logic goes here
    }, 1);
});
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1000 total points
ID: 41754458
The different browsers have different default padding and margins for HTML elements.  Eric Meyer came up with a 'CSS reset' which is used to set as many things to 0 as possible so you can follow it up with values that will be more predictable from browser to browser.  http://meyerweb.com/eric/tools/css/reset/
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
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 …
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Suggested Courses

971 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