How can I 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 refers to Firefox.) 30 30 Now most browsers support getBoundingClientRect method, which has become the best practice. Using an old answer is very slow, not accurate and has several bugs. The … Read more

How to manually send HTTP POST requests from Firefox or Chrome browser

I want to test some URLs in a web application I’m working on. For that I would like to manually create HTTP POST requests (meaning I can add whatever parameters I like). Is there any functionality in Chrome and/or Firefox that I’m missing? 1 17 I have been making a Chrome app called Postman for … Read more

What does do?

What’s the difference if one web page starts with <!DOCTYPE html> <html> <head> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> and If page starts with <!DOCTYPE html> <html> <head> <!– without X-UA-Compatible meta –> If there is no difference, I suppose I can just ignore the X-UA-Compatible meta header, since I just want it to be rendered in most … Read more

Why does HTML think “chucknorris” is a color?

Why do certain random strings produce colors when entered as background colors in HTML? For example, the following code produces a page with a red background across all browsers and platforms: <body bgcolor=”chucknorris”> test </body> On the other hand, the value chucknorr produces a yellow background! What’s going on here? 10 It’s a holdover from … Read more

IE 7 and 8 Not Showing Perfect Design View [WordPress]

I absolutely hate IE, specially versions 6, 7 and 8. When you are designing a wordpress theme, you have to style it twice, once for proper browsers and then for the IE ancients. The other big thing to remember, these ancients don’t have support for media queries. So to solve your problem, create a stylesheet … Read more