w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Why doesn't $(window).height() and $(document).height() equivalency work well in Firefox?
$(window).height(); will return the height of the visible window. $(document).height(); will return the height of the entire document, not just the visible part. Working Example That said, I don't think your specific issue is with the if statement... I tested it and it seems to work equally well in Firefox, Chrome, and IE9. Working Example 2 $(window).scroll(function () { if ($(window).scrollTop() +1 >= $(document).height() - $(window).height()) { $('body').css('background','red'); }else{ $('body').css('background','none'); } });

Categories : Javascript

Why is this CSS3 transition glitchy?
There are a couple of things that you should explore: Firstly, it can be more performant to transition transforms instead of box model properties (eg. left, top, etc), eg: -webkit-transition: -webkit-transform 0.2s ease; Then position them off the screen using using: .carousel-item { -webkit-transform: translateX(100%); } or, if you prefer: .carousel-item { -webkit-transform: translate3d(100%, 0, 0); } The issue with the carousel item ghosting back across is because it is still being transitioned back to it's resting position when this should be instantaneous. You can do this by setting the transition timing to 0s, eg: .carousel-item-instant { -webkit-transition-duration: 0s; } I see that you have a: -webkit-transition: none; class but this doesn't seem to be be

Categories : Jquery

Glitchy Animation on Canvas
It sounds like you're trying to control the speed of your animation by controlling the framerate. I recommend refactoring so that framerate is independent of animation speed. In other words, don't slow down your explosion by lowering your framerate. You should slow it down by making the flames / debris move less between each frame. That said, slowing the whole level down (elevators and all) when you die sounds like kind of a neat effect ;)

Categories : Javascript

Max-Height Firefox/Opera/IE
First of all I recommend you to start using a CSS-Reset like Normalize.css . It makes browsers render all elements more consistently and in line with modern standards. Your HTML notation might also cause inconsistency across browsers. Turn things like <div id = 'menu'> into <div id="menu">. This makes it also more readable IMHO. Inline style attributes make maintaining the pages a pain and may override things you didn't intent to. They also need to be applied to every single element thus also increasing download time. Using classes / id's is the way to go. Also pseudo-elements can't be used with inline styles. I advice to only use them for quick changes during development. I use the element inspector from Chrome / Firefox to change things quickly and instantly see how the cha

Categories : CSS

Code works on Firefox Desktop v 22 but not on Firefox Android v 22
Ok. After regression testing, it boils down to the nicescroll plugin - areaaperta.com/nicescroll removed the init code for this plugin and things have started working.

Categories : Android

What's the Fix for an iFrame Height Issues in FireFox?
Try placing the iframe at height:100%; in a div of height: 400px !important; or just make the iframe height: 400px;

Categories : HTML

Line-height issue with firefox
You shouldn't define a unit of measurement with line-height, this is so that the spacing is relative to the font size. In your example line-height: 60px; should be line-height: 1; or line height: 100%; as you are specifying that you want it to be the same height as the font.

Categories : HTML

Height to 0 hover effect under Firefox
You should wrap this into a div, so you keep the hover even when the #square div is no longer under the pointer : CSS #mydiv { position:fixed; top:50%; left:40%; width:11%; height:22%; } #mydiv:hover>#square { height:0%; } HTML <div id="mydiv"> <div id="square"></div> </div> Demo jsFiddle

Categories : HTML

$(window).height() value is constant in firefox 22.0
Under Firefox 22 on Windows 7, this code worked just fine for me: $(document).ready(function() { var h = $(window).height(); alert(h); }()); First reporting 1020 and then 774. Perhaps you are running it outside of a document.ready (which I don't think should make a difference). Outside of that, what operating system are you running on?

Categories : Javascript

horizontal height is different between Chrome and Firefox
The items that you provided appear to look just fine. If you still aren't satisfied with their appearance, you may want to consider using either a Normalize.css or Reset.css reference within your Project / Page. The purpose of these style-sheets is to help "normalize" all of the elements that are commonly used so that they appear similarly across different browsers and environments. (I would recommend checking if you have any other add-ins or extensions that could possibly be interfering with the appearance of any of your elements)

Categories : HTML

Get the height of a tag in Firefox, which I set as display: table; in CSS
I'm getting the height of header when added height: 200px in #header. demo Edit Okay! I got it. add table-layout: fixed; to your table class and then define the height as your wish of table-row class demo

Categories : Javascript

Firefox and Chrome rendering div height differently
Add line-height: 30px; to .menuitem in CSS. Edit I've tried with this CSS: .menuitem a { width:auto; font-size:30px; line-height:100%; z-index:9999; float:left; padding: 5px 10px 5px 10px; color: #fff; background-color: #000; } and it should work - but I've got almost 100% same result only when Google font is commented out and Arial is used. So it's obviously a difference in the font-rendering itself. I'm also always going crazy becuase of such differences ;)

Categories : HTML

element does not respect 100% height/width in Firefox
You need to give html a height of 100% as well: body, html { height: 100%; width: 100%; margin: 0; padding: 0; } jsfiddle

Categories : Firefox

Odd jQuery animate top/height/position bug in firefox and opera
Use float: left instead of display: inline-block on your list items. Then make sure to add a margin-right to your list items to space them apart, and add list-style: none to your ul to hide the bullets. ul { height: 30px; margin-top:200px; list-style: none; } ul li { width: 30px; position: relative; height: 30px; overflow: hidden; text-align: center; background:red; float: left; margin-right: 4px; } See DEMO.

Categories : Jquery

Vertical responsive image (max-height) not working in Firefox
.photo-bkg also needs its height set: .photo-bkg { height: 100%; } Here's a working fork of your pen.

Categories : Image

JCrop in Firefox attaches original image height/width
I have also met this issue and I tried everything and finally discovered a workaround that works for me: There must be an alert() function if using Firefox and jcrop destruction and initialization again. // Clear selector if (jcropAPI) { jcropAPI.destroy(); } initCropper(); // If browser is Firefox, fix bug with stretching if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { // Do Firefox-related activities alert('File successfully loaded'); // this alert is necessary if (jcropAPI) { jcropAPI.destroy(); } initCropper(); }

Categories : Jquery

If DOCTYPE is not specified on Chrome, Firefox, or Safari, is there a way to find the viewport's height?
To get viewport height: console.log(window.innerHeight); Demo Reference Tested in quirky Chrome and Firefox. Side note: jQuery does not support quirks mode. Using jQuery on a quirky page (no doctype specificied) may have an unexpected outcome. It is not tested in quirks mode and if it ever breaks, you won't get any support.

Categories : Javascript

Android - Bitmap Height = Textview Text Height?
Try using ImageSpan(resizedbitmap, ImageSpan.ALIGN_BASELINE) instead of ImageSpan(resizedbitmap) The default alignment of an ImageSpan is ALIGN_BOTTOM.

Categories : Android

Twitter Bootstrap: Getting Form Inputs and Buttons to be same the height in Chrome and Firefox
If you inspect the bootstrap styles, you will see that they do not explicitly define the height of the button, but the line-height. Make sure they have the same vertical padding, font-size, and border-size. Set the height and line-height of the input to x Set the line-height of the button to x sample code: #form-input, #form-button { line-height: 50px; font-size: 16px; } #form-input { height: 50px; }

Categories : CSS

CSS 100% height layout. Fluid header, footer and content. In IE10 and firefox
Well, I got close, but it still feels kinda sloppy. I can't imagine creating a page like this without using jQuery to determine the height of the screen, #footer, #header, etc... Forked Fiddle: http://jsfiddle.net/mRDux/

Categories : CSS

Background-size will not change height of (on left side) linear gradient in Firefox
Try this CSS, This has been tested in firefox and height works as expected... #yourid { width:200px; height:300px; background-image: -moz-linear-gradient(left center , rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.08) 1px, rgba(0, 0, 0, 0.08) 1px, transparent 30px, transparent 100%) !important; -moz-background-size:200px 100px; background-size:200px 100px; background-repeat:no-repeat; }

Categories : HTML

Android GridView row height is last column's row's height
I've had the same problem, to fix it I had to extend GridView and use a couple of dirty hacks... public class AutoGridView extends GridView { public AutoGridView(Context context, AttributeSet attrs, int defStyle){ super(context, attrs, defStyle); } public AutoGridView(Context context, AttributeSet attrs){ super(context, attrs); } public AutoGridView(Context context){ super(context); } @Override protected void layoutChildren(){ /*This method is called during onLayout. I let the superclass make the hard part, then I change the top and bottom of visible items according to their actual height and that of their siblings*/ final int childrenCount = getChildCount(); if(childrenCount <= 0){ //nothing to do, just call the super implementation super.layoutChildren

Categories : Android

Button height different from background height in Android
i've solved with this the ninepath must be smallest <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/btn_default_pressed_holo_dark" /> <!-- pressed --> <item android:drawable="@drawable/btn_default_normal_holo_dark" /> <!-- default --> </selector>

Categories : Android

how can i display border height and width in pixel in chrome or firefox to test for responsive webdesign
In Chrome, there is a "gear" icon to the bottom right of the development tools (right-click on any element, then "Inspect Element") that opens up the general settings. Just check "Show Rulers" in the "Elements" section, then hover on elements in the HTML code in the Elements pane.

Categories : Javascript

Firefox places font baseline at center of line-height (font: Knockout 46 Flyweight)
I had a similar problem and it turned out, that my files for the font where somehow corrupted. I uploaded one file here: http://www.fontsquirrel.com/tools/webfont-generator which generates font files in all kinds of formats and replaced the font files. That fixed it for me. Might also be similar to this question: @font-face problem, Firefox adds padding, Chrome does not

Categories : CSS

calculate and set the height for some div (initial settings). When the height of the browser window is changed --> change the height for div
is that what you are looking for? api.jquery.com jQuery(document).ready(function () { $(window).resize(function() { var height = document.documentElement.clientHeight - 500; if (height < 135) { height = 135; } document.getElementById('left_space').style.height = height + 'px'; jQuery(window).resize(function () { var height = document.documentElement.clientHeight - 500; if (height < 135) { height = 135; } document.getElementById('left_space').style.height = height + 'px'; }); }); });

Categories : Javascript

What is use of Android:height attribute despite having Android:layout_height
According to the Docs Makes the TextView be exactly this many pixels tall. I'm guessing its something old and is only if you want to dictate, as it says, a specific number of pixels. I wouldn't suggest using it but stick with android:layout_height

Categories : Android

What's the difference between android:height and android:layout_height?
From playing about with this a bit, I think that layout_height is flexible - a preferred height but will still expand/shrink with the content - and height is a definite value. What's happening in your case is that the TextView is wrapping around the Test text but still using the 48dp paddingTop attribute.

Categories : Android

Selenium for firefox Android
Yes, there is something that is being worked on for that. I think it's called Selendroid . If that's not what you are looking for, its a good place to start. Also, in the future there is another project called Marionette but I am unsure if it is yet ready for use.

Categories : Selenium

css for android browser and firefox
Did you try : html { height:100%; } body { min-height:100%; } Code a litlle short to understand more of what's going next, inside body html structure and it's CSS

Categories : Android

Android web server not supported by firefox
the problem is solved i replace the line else return "text/plain"; to else return "text/html"; Actually the problem was in MIME type thank you all for helping me...

Categories : Java

Why my firefox for android extension is deactivated on its own?
the error was caused by the tabSelect event listener, it was added in the wrong place, to make it work properly, I did this: //adding the listeners let addListener = function() { window.BrowserApp.deck.addEventListener("TabSelect", function(){ watchTab(window);}, false); window.BrowserApp.deck.addEventListener("pageshow", function(){ watchTab(window);}, false); window.NativeWindow.toast.show("Starting to detect trackers.", "long"); }; if(window.BrowserApp.deck) { // BrowserApp.deck has been initialized addListener(); } else { // use the chrome window to wait for BrowserApp to initialize window.addEventListener("UIReady", addListener); } Then of course I removed these listeners later.

Categories : Android

Detecting pinch-zoom in firefox on android
Solution: I inserted a (hidden) div with width:100%. And a function that regularly monitors this div's width. - When the width in pixels changes, zoom has changed (or orientation or screen size.. whatever): call myResize(). Demo: http://krydster.dk - Crossword puzzle game (danish).

Categories : Javascript

Firefox for Android does not launch app when link is clicked
One option would be to add a hidden iframe, something like: <iframe src="myscheme://..." style="visibility: hidden"></iframe> It is tested to work on firefox, but it won't work on chrome. You probably want to use some user agent detection, here's an example: http://www.mazdigital.com/blog/post/2014/deep-links-on-mobile-browsers-demystified/

Categories : Android

firefox and chrome on android, font inflation on one p and not another
We have a think called Font Boosting, it is designed to make text that is hard to read on a mobile device more readable. You can't really get around it other than to create a mobile optimised site by including the mobile viewport meta tag <meta name="viewport" content="width=device-width"> this will turn off the font-boosting, but it will mean the width of the screen is measured in CSS pixels at about 480px on a Nexus4.

Categories : Android

Detect address bar changes firefox android extension
I don't know why "load" is not working for you. I do know that "load" is sometimes not called, when loading a page from back/forward session history for example. To work around that, you could try using the "pageshow" event. That will be called for any page-change. For more info see: https://developer.mozilla.org/en-US/docs/Code_snippets/Mobile

Categories : Android

Javascript function does not call on firefox for android
I dont know about how much difference in browser version, but you should try below code <a id="btnCall" class="btn_call_infobox" href="javascript:void(0)" onclick="javascript:booking.userCall(189, '42.87930679999999', '10.964063200000055', this.id);">Call</a>

Categories : Javascript

including a js file in bootstrap.js firefox for android extension
Actually, content is supported in bootstrapped add-ons since quite some time (first in Gecko 8 and starting with Gecko 10, it will auto load manifests, IIRC). You can load js code modules from chrome://yourpackage/content/... not just from resource-URIs (since Gecko 4, IIRC). So there is nothing holding you back from using mozilla-style code modules. Also, a couple of add-ons manually add resource substitutions. The stuff that Erik wrote uses a custom include function, implemented in the corresponding bootstrap.js using loadSubScript. That's an option, too. This scheme was invented when it wasn't yet possible to use js code modules from bootstrapped add-ons properly, e.g. because there was no Cu.unload yet. Using content + Cu.import + Cu.unload is likely the easiest approach. Real worl

Categories : Android

nsIPrefBranch for Firefox for android extension returns NS_ERROR_UNEXPECTED
Bootstrapped (restartless) add-ons do not support auto-prefs via defaults/preferences. It is the responsibility of your bootstrap code to set up default preferences accordingly. Since your auto-prefs were never loaded, the getCharPref() call has to fail. You will need to get the default branch and seed your preferences. An easy way to do so would be: const PREF_BRANCH = "extensions.myaddon."; const PREFS = { someIntPref: 1, someStringPref: "some text value" }; function setDefaultPrefs() { let branch = Services.prefs.getDefaultBranch(PREF_BRANCH); for (let [key, val] in Iterator(PREFS)) { switch (typeof val) { case "boolean": branch.setBoolPref(key, val); break; case "number": branch.setIntPref(key, val); break; case "string"

Categories : Android

How do I get the height of the screen in Android?
The best solution I have managed to come up with is this: Display display = getWindowManager().getDefaultDisplay(); DisplayMetrics metrics = new DisplayMetrics(); display.getMetrics(metrics); screenWidth = metrics.widthPixels; screenHeight = metrics.heightPixels; TypedValue tv = new TypedValue(); if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { if (getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true)) screenHeight -= TypedValue.complexToDimensionPixelSize(tv.data,getResources().getDisplayMetrics()); } int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android"); if (resourceId > 0) screenHeight -= getResources().getDimensionPixelSize(resourceId); I have tested it on API 7 - 17. Unfortunately, on API 13 there is

Categories : Java



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.