EzDevInfo.com

cross-browser interview questions

Top cross-browser frequently asked interview questions

Get the size of the screen, current web page and browser window

How can I get windowWidth, windowHeight, pageWidth, pageHeight, screenWidth, screenHeight, pageX, pageY, screenX, screenY which will work in all major browsers?

screenshot describing which values are wanted


Source: (StackOverflow)

CSS rule to disable text selection highlighting

For anchors that act like buttons (for example, Questions, Tags, Users, etc. at the top of the Stack Overflow page) or tabs, is there a CSS standard way to disable the highlighting effect if the user accidentally selects the text?

I realize this could be done with JavaScript, and a little googling yielded the Mozilla-only -moz-user-select option.

Is there a standard-compliant way to accomplish this with CSS, and if not, what is the "best practice" approach?


Source: (StackOverflow)

Advertisements

"let" keyword vs "var" keyword

In JavaScript 1.7, the let keyword was added. I've heard it described as a "local" variable, but I'm still not quite sure how it behaves differently than the var keyword.

What are the differences? When should let be used over var?


Source: (StackOverflow)

How to vertically center a div for all browsers?

I want to center a div vertically with CSS. I don't want tables or Javascript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.

<body>
    <div>Div to be aligned vertically</div>
</body>

How can I center a div vertically in all major browsers, including Internet Explorer 6?


Source: (StackOverflow)

What is JavaScript's highest integer value that a Number can go to without losing precision?

Is this defined by the language? Is there a defined maximum? Is it different in different browsers?


Source: (StackOverflow)

How to style a