Solved

Css: Different height values between browsers

Posted on 2016-08-12
2
45 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
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.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now