you are in: codestackercodes [RSS] → tag: ie6 [RSS]

ie 6 and 7 selectors hack Delicious Email

show/hide lines
   1  * html #selector {property:value;} /* Only IE6 and lower will see this */
   2  *+html #selector {property:value;} /* Only IE7 will see this */
created by leozera — 22 August 2009 — get a short url — tags: browser hack ie ie6 ie7 embed

hover for ie 6 Delicious Email

show/hide lines
   1  /* IE6 - pseudo class :hover */ 
   2  $(document).ready(function(){ 
   3  	if(jQuery.browser.msie && jQuery.browser.version<7){ 
   4  		$('[class*="bla"]').hover( 
   5  		function () { 
   6  			$(this).addClass('hover'); 
   7  		}, 
   8  		function () { 
   9  			$(this).removeClass('hover'); 
  10  		} 
  11  		); 
  12  	} 
  13  });
created by leozera — 10 August 2009 — get a short url — tags: browser hack ie ie6 javascript jquery embed

[prototype] adding input:focus functionality to ie Delicious Email

show/hide lines
   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  // in css, paste
   9  // input:focus, /* works in FF without javascript */ 
  10  // input.focused /* used by js */ 
  11  // { background-color: #f7cd72; } 
created by leozera — 18 November 2008 — get a short url — tags: hack ie6 javascript prototype embed

another ie 6 hack Delicious Email

show/hide lines
   1  p {			
   2  	background: green !important; /* Major browsers other than IE 6 and below respect the importance immediately */
   3  	background: red; /* IE 6 and below use this value instead, even though the above was marked as important */
   4  }
created by leozera — 23 July 2008 — get a short url — tags: css hack ie ie6 embed

1kb ie 6 png fix hack Delicious Email

create a 1×1 ‘clear.gif’ image

show/hide lines
   1  var clear="images/clear.gif" //path to 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);
created by leozera — 17 July 2008 — get a short url — tags: browser css hack ie6 js embed