Solved

Css: Different height values between browsers

Posted on 2016-08-12
2
58 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 250 total points
ID: 41754452
Try this;

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

Accepted Solution

by:
Dave Baldwin earned 250 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

Title # Comments Views Activity
Why a span is lower 2 26
Center div containing a script 6 22
Insert Button on a table 16 38
How can I make a div layout like the one in the image 2 26
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

828 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