All Questions

984
votes
40answers
1040281 views

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> <...
737
votes
19answers
368988 views

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?
4067
votes
33answers
1329498 views

How 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 ...
820
votes
10answers
542720 views

What is a clearfix?

Recently I was looking through some website's code, and saw that every <div> had a class clearfix. After a quick Google search, I learned that it is for IE6 sometimes, but what actually is a c...
947
votes
24answers
1187396 views

How to style a <select> dropdown with CSS only without JavaScript?

Is there a CSS-only way to style a <select> dropdown? I need to style a <select> form as much as humanly possible, without any JavaScript. What are the properties I can use to do so in CS...
274
votes
15answers
214642 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 ...
557
votes
7answers
199431 views

Are the PUT, DELETE, HEAD, etc methods available in most web browsers?

I've seen a couple questions around here like How to debug RESTful services, which mentions: Unfortunately that same browser won't allow me to test HTTP PUT, DELETE, and to a certain degree even H...
1413
votes
15answers
1051229 views

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?
227
votes
20answers
260264 views

JavaScript get clipboard data on paste event (Cross browser)

How can a web application detect a paste event and retrieve the data to be pasted? I would like to remove HTML content before the text is pasted into a rich text editor. Cleaning the text after bein...
537
votes
12answers
397030 views

Get the browser viewport dimensions with JavaScript

I want to provide my visitors the ability to see images in high quality, is there any way I can detect the window size? Or better yet, the viewport size of the browser with JavaScript? See green area...

Previous Next