Solved

Css: Different height values between browsers

Posted on 2016-08-12
2
36 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
Comment Utility
Try this;

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

Accepted Solution

by:
Dave Baldwin earned 250 total points
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
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 this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
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.

743 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

11 Experts available now in Live!

Get 1:1 Help Now