1 Event.observe(window, 'load', function() {
2 var fields = $$("input");
3 for (var i = 0; i fields[i].onfocus = function() {this.className += ' focused';}
4 fields[i].onblur = function() {this.className = this.className.replace('focused', '');}
5 }
6 });
7
8
9
10
11
Event.observe(window, 'load', function() {
var fields = $$("input");
for (var i = 0; i fields[i].onfocus = function() {this.className += ' focused';}
fields[i].onblur = function() {this.className = this.className.replace('focused', '');}
}
});
1
2
3
4
5 # Embedded CSS
6
7
8
9
10
11
12 # The opposite technique, targeting only NON-IE browsers:
13
14
15
16
17 # Target specific versions of IE
18 # IE 7 ONLY:
19
20
21
22
23 # IE 6 ONLY:
24
25
26
27
28 # IE 5 ONLY:
29
30
31
32
33 # IE 5.5 ONLY:
34
35
36
37
38 # VERSION OF IE VERSION 6 OR LOWER: (I find this one pretty handy)
39
40
41
# Embedded CSS
# The opposite technique, targeting only NON-IE browsers:
# Target specific versions of IE
# IE 7 ONLY:
# IE 6 ONLY:
# IE 5 ONLY:
# IE 5.5 ONLY:
# VERSION OF IE VERSION 6 OR LOWER: (I find this one pretty handy)
1 p {
2 background: green !important;
3 background: red;
4 }
p {
background: green !important;
background: red;
}
create a 1×1 ‘clear.gif’ image
1 var clear="images/clear.gif"
2
3 pngfix=function(){var els=document.getElementsByTagName('*');var i_p=/\.png/i;var i=els.length;while (i-- >0){var el=els[i];var es=el.style;if(el.src&&el.src.match(i_p)&&es.filter==''){el.height = el.height;el.width = el.width;es.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+el.src+"',sizingMethod='crop')";el.src = clear;}else{var elb=el.currentStyle.backgroundImage;if(elb.match(i_p)){var path=elb.split('"');var rep=(el.currentStyle.backgroundRepeat=='no-repeat')?'crop':'scale';es.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+path[1]+"',sizingMethod='"+rep+"')";es.height=el.clientHeight+'px';es.backgroundImage="none";}}if (el.currentStyle.position!='absolute' && !es.filter && !el.tagName.match(/(body|html|script)/gi)) es.position="relative";if (es.filter&&el.currentStyle.position=="relative") es.position="static";}}
4 window.attachEvent('onload',pngfix);
var clear="images/clear.gif"
pngfix=function(){var els=document.getElementsByTagName('*');var i_p=/\.png/i;var i=els.length;while (i-- >0){var el=els[i];var es=el.style;if(el.src&&el.src.match(i_p)&&es.filter==''){el.height = el.height;el.width = el.width;es.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+el.src+"',sizingMethod='crop')";el.src = clear;}else{var elb=el.currentStyle.backgroundImage;if(elb.match(i_p)){var path=elb.split('"');var rep=(el.currentStyle.backgroundRepeat=='no-repeat')?'crop':'scale';es.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+path[1]+"',sizingMethod='"+rep+"')";es.height=el.clientHeight+'px';es.backgroundImage="none";}}if (el.currentStyle.position!='absolute' && !es.filter && !el.tagName.match(/(body|html|script)/gi)) es.position="relative";if (es.filter&&el.currentStyle.position=="relative") es.position="static";}}
window.attachEvent('onload',pngfix);
http://www.dustindiaz.com/min-height-fast-hack/
1 selector {
2 min-height:500px;
3 height:auto !important;
4 height:500px;
5 }
selector {
min-height:500px;
height:auto !important;
height:500px;
}