All Questions

693
votes
23answers
332187 views

How to tell if a DOM element is visible in the current viewport?

Is there an efficient way to tell if a DOM element (in an HTML document) is currently visible (appears in the viewport)? (The question regards Firefox)
274
votes
15answers
214591 views

'innerText' works in IE, but not in Firefox

I have some JavaScript code that works in IE containing the following: myElement.innerText = "foo"; However, it seems that the 'innerText' property does not work in Firefox. Is there some Firefox ...
510
votes
20answers
802627 views

Hide scroll bar, but while still being able to scroll

I want to be able to scroll through the whole page, but without the scrollbar being shown. In Google Chrome it's: ::-webkit-scrollbar { display: none; } But Mozilla Firefox and Internet Expl...
290
votes
6answers
335513 views

Get image data in JavaScript?

I have a regular HTML page with some images (just regular <img /> HTML tags). I'd like to get their content, base64 encoded preferably, without the need to redownload the image (ie. it's already...
377
votes
6answers
579391 views

Using <meta> tags to turn off caching in all browsers?

I read that when you don't have access to the web server's headers you can turn off the cache using: <meta http-equiv="Cache-Control" content="no-store" /> But I also read that this doesn't w...
327
votes
15answers
461582 views

JavaScript open in a new window, not tab

I have a select box that calls window.open(url) when an item is selected. Firefox will open the page in a new tab by default. However, I would like the page to open in a new window, not a new tab. ...
183
votes
17answers
187018 views

Selenium using Python - Geckodriver executable needs to be in PATH

I'm new to programming and started with Python about 2 months ago and am going over Sweigart's Automate the Boring Stuff with Python text. I'm using IDLE and already installed the selenium module and ...
6
votes
2answers
2815 views

Why doesn't percentage padding / margin work on flex items in Firefox?

I want to have a square div inside a flexbox. So I use: .outer { display: flex; width: 100%; background: blue; } .inner { width: 50%; background: yellow; padding-bottom: 50%; ...
488
votes
10answers
453601 views

Targeting only Firefox with CSS

Using conditional comments it is easy to target Internet Explorer with browser-specific CSS rules: <!--[if IE 6]> ...include IE6-specific stylesheet here... <![endif]--> Sometimes it is...
35
votes
4answers
98710 views

Selenium using Java - The path to the driver executable must be set by the webdriver.gecko.driver system property

I am trying to launch Mozilla but still I am getting this error: Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.dr...

Previous Next