text-overflow: ellipsis

On 1-30-2005, in Coding, CSS, by Alex

overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
will add […] (IE only)
Nice tool for grids

 

Custom DOM/JS combobox

On 1-26-2005, in Coding, JavaScript, by Alex

SelectList Object

The SelectList object replicates an HTML Select List. I used to have a Select object that was similar to this, however the SelectList object contains entirely new code, and works a lot better. If you used the previous Select object, remove it and use this code instead. This object leverages off the existing List Object, and wraps it in a package resembling a selection widget.

 

How to get real window width

On 1-18-2005, in Coding, JavaScript, by Alex

Very useful function to get real browser’s width.
For height just replace [Width] to [Height]


	function getWindowWidth() {
		var windowWidth = 0;
		if (typeof(window.innerWidth) == 'number') {
			windowWidth = window.innerWidth;
		}
		else {
			if (document.documentElement && document.documentElement.clientWidth) {
				windowWidth = document.documentElement.clientWidth;
			}
			else {
				if (document.body && document.body.clientWidth) {
					windowWidth = document.body.clientWidth;
				}
			}
		}
		return windowWidth;
	}
 

Input type=”file” solution

On 1-18-2005, in Coding, CSS, JavaScript, by Alex

Styling an input type=”file”
at quirksmode.org

Of all form fields, the file upload field is by far the worst when it comes to styling. Explorer Windows offers some (but not many) style possibilities, Mozilla slightly less, and the other browsers none at all. The “Browse” button, especially, is completely inaccessible to CSS manipulation.

 

PNG Behavior

On 1-14-2005, in Coding, CSS, HTML, JavaScript, by Alex

This behavior adds support for the most powerful raster graphic format available to Internet Explorer. It is of course our all beloved PNG format I am talking about. This format can have an 8 bit alpha channel which allows the images to be semi transparent. Transparency allows images to have antialiased edges and this makes the images look more professional…

Implementation