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

ie6 notice Delicious

used here!

show/hide lines
   1  <!--[if IE 6]>
   2  IE 6 is a junkie!
   3  <![endif]-->
created by leozera — 08 November 2008 — get a short url embed

vertical align with javascript Delicious

source: http://snipplr.com/view/9321/vertically-align-within-browser-window/

show/hide lines
   1  <div id="verticalContainer">
   2  	This text will always be vertically centered inside the browser window
   3  </div>
   4  
   5  <script type="text/javascript">
   6  	function getWindowHeight() {
   7  		var windowHeight = 0;
   8  		if (typeof(window.innerHeight) == 'number') {
   9  			windowHeight = window.innerHeight;
  10  		}
  11  		else {
  12  			if (document.documentElement && document.documentElement.clientHeight) {
  13  				windowHeight = document.documentElement.clientHeight;
  14  			}
  15  			else {
  16  				if (document.body && document.body.clientHeight) {
  17  					windowHeight = document.body.clientHeight;
  18  				}
  19  			}
  20  		}
  21  		return windowHeight;
  22  	}
  23  
  24  	function setContent() {
  25  		if (document.getElementById) {
  26  			var windowHeight = getWindowHeight();
  27  			if (windowHeight > 0) {
  28  				var contentElement = document.getElementById('verticalContainer');	// Be sure to specify the correct ID
  29  				var contentHeight = contentElement.offsetHeight;
  30  				if (windowHeight - contentHeight > 0) {
  31  					contentElement.style.position = 'relative';
  32  					contentElement.style.top = ((windowHeight / 2) - (contentHeight / 2)) + 'px';
  33  				}
  34  				else {
  35  					contentElement.style.position = 'static';
  36  				}
  37  			}
  38  		}
  39  	}
  40  
  41  	window.onresize = function() {
  42  		setContent();
  43  	}
  44  
  45  	window.onload = function() {
  46  		setContent();
  47  	}
  48  </script>
created by leozera — 01 November 2008 — get a short url — tags: align javascript embed

search box onclick clear/unclear Delicious

this’s used here!

show/hide lines
   1  <script type="text/javascript">
   2      function clickclear(thisfield, defaulttext) {
   3          if (thisfield.value == defaulttext) {
   4              thisfield.value = "";
   5          }
   6      }
   7      
   8      function clickrecall(thisfield, defaulttext) {
   9          if (thisfield.value == "") {
  10              thisfield.value = defaulttext;
  11          }
  12      }
  13  </script>
  14  
  15  <input id="search" type="text" name="q" value="search" onclick="clickclear(this, 'search')" onblur="clickrecall(this,'search')"/>
created by leozera — 01 November 2008 — get a short url — tags: input javascript embed

ie conditional hack Delicious

show/hide lines
   1  <!--[if IE]>
   2  	<link rel="stylesheet" type="text/css" href="ie-only.css" />
   3  <![endif]-->
   4  
   5  # Embedded CSS
   6  <!--[if IE]>
   7    <style type="text/css">
   8      #container {font-family: arial,verdana,sans-serif,tahoma;}
   9    </style>
  10  <![endif]-->
  11  
  12  # The opposite technique, targeting only NON-IE browsers:
  13  <!--[if IE]>
  14  	<link rel="stylesheet" type="text/css" href="ie-only.css" />
  15  <![endif]-->
  16  
  17  # Target specific versions of IE
  18  # IE 7 ONLY:
  19  <!--[if IE 7]>
  20  	<link href="IE-7-SPECIFIC.css" rel="stylesheet" type="text/css">
  21  <![endif]-->
  22  
  23  # IE 6 ONLY:
  24  <!--[if IE 6]>
  25  	<link rel="stylesheet" type="text/css" href="IE-6-SPECIFIC.css" />
  26  <![endif]-->
  27  
  28  # IE 5 ONLY:
  29  <!--[if IE 5]>
  30  	<link rel="stylesheet" type="text/css" href="IE-5-SPECIFIC.css" />
  31  <![endif]-->
  32  
  33  # IE 5.5 ONLY:
  34  <!--[if IE 5.5000]>
  35  <link rel="stylesheet" type="text/css" href="IE-55-SPECIFIC.css" />
  36  <![endif]-->
  37  
  38  # VERSION OF IE VERSION 6 OR LOWER: (I find this one pretty handy)
  39  <!--[if lt IE 7]>
  40  	<link rel="stylesheet" type="text/css" href="IE-6-OR-LOWER-SPECIFIC.css" />
  41  <![endif]-->
created by leozera — 17 September 2008 — get a short url — tags: css hack ie embed

valid Flash example for XHTML 1.0 Strict (XHTML 1.1) Delicious

show/hide lines
   1  <object type="application/x-shockwave-flash" data="images/banner.swf" width="288" height="128">
   2  <param name="movie" value="images/banner.swf" />
   3  <img src="banner.gif" width="288" height="128" alt="banner" />
   4  </object>
created by leozera — 21 July 2008 — get a short url — tags: embed flash xhtml embed