<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Expressing IT &#187; Tutorials</title>
	<atom:link href="http://developer.expressionz.in/blogs/tag/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://developer.expressionz.in/blogs</link>
	<description>User Interface : just another, but a serious developers weblog</description>
	<lastBuildDate>Thu, 20 May 2010 18:05:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>@fontface : Expressing it with a font of your choice; Using WebFonts</title>
		<link>http://developer.expressionz.in/blogs/2010/03/13/fontface-expressing-it-with-a-font-of-your-choice-using-webfonts/</link>
		<comments>http://developer.expressionz.in/blogs/2010/03/13/fontface-expressing-it-with-a-font-of-your-choice-using-webfonts/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 09:31:59 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Webfonts]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=210</guid>
		<description><![CDATA[CSS completed 10 years existence this year! Those who have been around for a while , earning their bread (or not) using CSS, then you might aware how we have been starving for  a good selection of fonts. ]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2010%2F03%2F13%2Ffontface-expressing-it-with-a-font-of-your-choice-using-webfonts%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2010%2F03%2F13%2Ffontface-expressing-it-with-a-font-of-your-choice-using-webfonts%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Tutorials,Webfonts" height="61" width="50" /><br />
			</a>
		</div>
<p>CSS completed 10 years existence this year! Those who have been around for a while , earning their bread (or not) using CSS, then you might aware how we have been starving for  a good selection of fonts.  Even with the lack of fonts designers like those at  <a href="http://www.csszengarden.com/" target="_blank">CSS Zen Garden</a> have made use of CSS background images to replace fonts  in the pursuit of doing some justice to their designs .  We have also tried Flash/JavaScript® hacks to achieve our design goals.  By no means this is  a wrong way to get the fonts we desire into our web designs, but definitely, it is not the most desirable way.  and over years web designer, like me ,  have fully relied  on ten or so  fonts for their designs.</p>
<p>Recent developments in web standards and font formats make it possible to render HTML text in typefaces other than the same old default fonts.   Comes in  the &#8220;<strong>@fontface</strong>&#8221; CSS decleration.</p>
<p><strong>@fontface</strong> provids a solution to link  to the actual font file and retrieve it from the web.  Using @fontface , designers can use  fonts without having to freeze the text as background images.  The implementation is very straight forward, as shown below but  as all good things have a CON part to it , NOT ALL browsers support a single &#8220;<em>font type</em> &#8220;.  If you are planning to use <strong>@fontface</strong> in site with requiring cross browser support, then you will have to provide sources to various font-types of the same.</p>
<ol>
<li><strong>TrueType</strong> &#8211; A format designed to look good on-screen. Recommended particularly for Windows browsers (Chrome).</li>
<li><strong>OpenType (CFF)</strong> &#8211; This format is better for print work and does not always look good on Windows.</li>
<li><strong>EOT</strong> &#8211; You need this format if you want to target Internet Explorer. IE will not use any other format. Our EOT&#8217;s would be considered &#8220;Lite,&#8221; since they are neither compressed nor domain-restricted.</li>
<li><strong>SVG</strong> &#8211; This is an XML format supported by some browsers including the iPhone.</li>
<li><strong>WOFF</strong> &#8211; This cross-browser, web-only font format is lightweight (font data is zip compressed) and can be compiled with either TrueType or PostScript (CFF) outlines. It is currently supported by FireFox 3.6+.</li>
</ol>
<p><strong>Using @fontface</strong></p>
<pre>@font-face {
font-family: 'CalligraphyFLFRegular';
src: url('CalligraphyFLF.eot');
src: local('CalligraphyFLF'), local('CalligraphyFLF'), url('CalligraphyFLF.woff') format('woff'), url('CalligraphyFLF.ttf')        format('truetype'), url('CalligraphyFLF.svg#CalligraphyFLF') format('svg');
}
@font-face {
  font-family: "Your typeface";
  src: url("fonts/font_filename.eot");
  src: local("Alternate name"), local("Alternatename"),
    url("fonts/font_filename.woff") format("woff"),
    url("fonts/font_filename.otf") format("opentype"),
    url("fonts/font_filename.svg#font_filename") format("svg");
  }
h2 { font-family: "Your typeface", Georgia, serif; }</pre>
<p>As  you can see from the above example, to include the chosen font typeface, one has to  link to a set of fonttypes for the same typeface. Hence people refer to it as <strong>&#8220;Font Kit&#8221;</strong>.<br />
There are  Font Kits available that explicitly allows linking with the CSS @font-face property to it under End User License Agreement (EULA).</p>
<p><strong>Useful WebFont Resources : </strong></p>
<ul>
<li><a href="http://webfonts.info/wiki/index.php?title=Fonts_available_for_%40font-face_embedding" target="_blank">Fonts available for @font-face embedding</a> wiki page at <a href="http://webfonts.info/wiki/index.php?title=Main_Page" target="_blank">http://webfonts.info/wiki/index.php?title=Main_Page<br />
</a></li>
<li><a href="http://www.larabiefonts.com/" target="_blank">Ray Larabie</a> .  He is a renowned font designer who has made hundreds of interesting TrueType fonts freely available for use on the web. His fonts are elegant, decorative, and playful.</li>
<li><a href="http://moorstation.org/typoasis/designers/steffmann/index.htm" target="_blank">Dieter Steffmann</a> is another great font designer. He, too, has made many beautiful fonts available for anyone to use.</li>
<li><a href="http://www.fontshop.com/fonts/" target="_blank">Font shop</a> : offers fonts designed specifically for web use.  More than 30 of the most successful FontFont families are now available as Web FontFonts.   FontShop  also has  a detailed WebFont user guide  <a href="http://www.fontshop.com/blog/newsletters/pdf/webfontfontuserguide.pdf" target="_blank">http://www.fontshop.com/blog/newsletters/pdf/webfontfontuserguide.pdf<br />
</a></li>
<li><a href="http://www.fontsquirrel.com/fontface" target="_blank">Font Squirrel</a> :  Showcases all the fonts that Font Squirrel offers for use with @font-face CSS embedding. Font Squirrel offers an impressive quantity of type, makes it dead simple to pick one out, and handily offers “kits” – the typeface of your choice, in several formats, packaged with demo HTML &amp; CSS that uses very current @font-face syntax. They also offer a way to <a href="http://www.fontsquirrel.com/fontface/generator">make your own @font-face kits</a>.  If the typeface you want to use has been licensed appropriately (the ones that come with your computer are not necessarily okay), the generator produces EOT, SVG, and hey! WOFF files.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2010/03/13/fontface-expressing-it-with-a-font-of-your-choice-using-webfonts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding DropShadow To Images Using CSS</title>
		<link>http://developer.expressionz.in/blogs/2009/02/18/adding-dropshadow-to-images-using-css/</link>
		<comments>http://developer.expressionz.in/blogs/2009/02/18/adding-dropshadow-to-images-using-css/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 09:06:20 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=64</guid>
		<description><![CDATA[The reason why , I opted for drop shadow using CSS is that , usually while creating a page design/html of an application , the requirements keep iterating. What I mean is , In a existing web site with many images, like the ones displaying freinds list or an image gallery, it will be difficult to reprocess the entire load of images that had been already unloaded to add or remove the shadows, for that matter.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2009%2F02%2F18%2Fadding-dropshadow-to-images-using-css%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2009%2F02%2F18%2Fadding-dropshadow-to-images-using-css%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=CSS,Tips+%26amp%3B+Tricks,Tutorials" height="61" width="50" /><br />
			</a>
		</div>
<p>Another quick tut. Here is something simple and nice using the POWER of CSS&#8230; but was difficult concieve( and it surely wasn&#8217;t me) to begin with . Adding Dropshadow, might be a peice of cake for many of us, using some image editing tools like Photoshop anf Fireworks etc.<br />
The reason why , I opted for drop shadow using CSS is that , usually while creating a page design/html of an application , the requirements keep iterating. What I mean is , In a existing web site with many images, like the ones displaying freinds list or an image gallery, it will be difficult to reprocess the entire load of images that had been already unloaded to add or remove the shadows, for that matter.<br />
So If you have done a little forward thinking while creating the HTMLS to add these extra divisions or usually the situation is that you have a Loop Logic generating these icons/thumbnails in XSL, PHP. JAVA or any other programming /scripting language, you can add it anytime, then is just the matter of show and hiding these shadows using the CSS Display property,as per the clients ever changing requirements &#8230; I havn&#8217;t done this sort of forward thinking before this &#8230; but ahev started now!</p>
<p>In the example below, the original image is shadow free and the dropshadows are applied as required! ALSO, I have gone a little extra, by using the tricks of my earlier Tut ( Well! these probably are shortest variety of Tutorials , so it is only justified calling them &#8220;Tut&#8221;&#8217;s ) about <a href="http://developer.expressionz.in/blogs/2009/02/17/understandng-the-css-clip-property/">Using CSS Clip Property</a> for show off only</p>
<h4>Original Image</h4>
<p> <img class="alignnone size-full wp-image-56" title="original_image" src="http://developer.expressionz.in/blogs/wp-content/uploads/2009/02/original_image.jpg" alt="original_image" width="220" height="150" /> </p>
<h4>CSS DropShadow Results<br />
<img class="alignnone size-full wp-image-65" title="css_dropshadow_results" src="http://developer.expressionz.in/blogs/wp-content/uploads/2009/02/css_dropshadow_results.jpg" alt="css_dropshadow_results" width="465" height="145" /><br />
<strong><a href="http://developer.expressionz.in/downloads/adding_dropshadow_to_images_using_css_only/">View Demo </a></strong> | <strong><a href="http://developer.expressionz.in/blogs/wp-content/plugins/download-monitor/download.php?id=14">Download sourcefiles</a></strong></h4>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2009/02/18/adding-dropshadow-to-images-using-css/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Understandng The CSS Clip Property</title>
		<link>http://developer.expressionz.in/blogs/2009/02/17/understandng-the-css-clip-property/</link>
		<comments>http://developer.expressionz.in/blogs/2009/02/17/understandng-the-css-clip-property/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 10:23:13 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Clip]]></category>
		<category><![CDATA[CSS Positioning]]></category>
		<category><![CDATA[CSS rect]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=55</guid>
		<description><![CDATA[Most of CSS writers would agree that CSS Clip property is probably one of most un-used CSS properties. It was so true for me too and was most happy to neglect it , until I started modifying the MOOTOOLS TWO Knob (Pin) Slider Component(with Range Indicator).]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2009%2F02%2F17%2Funderstandng-the-css-clip-property%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2009%2F02%2F17%2Funderstandng-the-css-clip-property%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=CSS+Clip,CSS+Positioning,CSS+rect,Tips+%26amp%3B+Tricks,Tutorials" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>Why do I want to understand this??? &#8230; Humm!!!!</strong></p>
<p>Most of CSS writers would agree that CSS Clip property is probably one of most un-used CSS properties. It was so true for me too and was most happy to neglect it , until I started modifying the <a href="http://developer.expressionz.in/blogs/2008/10/24/mootools-slider-with-two-knobs-double-pinned-slider-with-range-indicator/#comments">MOOTOOLS TWO Knob (Pin) Slider Component(with Range Indicator)</a>.</p>
<p>There was a good suggestion from one of the component users to modify the Slider Component using clipped backgroud images( against a variable width division) to indicate the slider range. Thus came my time to enter the fun but un-chartered (for me ofcourse) waters of the CSS Clip property.</p>
<p>Well! how difficult it can be? Not much at all &#8230;YES and NO. The syntax to use the CSS Clip property is pretty upright but the meaning/usuage is a bit croocked. With a memory like mine, everytime I sit to rework on my Slider Script&#8230; I have tokeep referring back to usage of this CLIP property , to remind myself the logic that I have created in my script &#8230;. HENCE! thought to pen it down, with a hope to remember it the future ( and also for the benefit of those who seem boggled by the CSS Clip Property)</p>
<p><strong>What does CSS Clip do?</strong></p>
<p>Clip is part of the visual effects module of CSS 2.1 . Simply put, its job is to place a visible window on top of an object that is being clipped , hence clipping images and creating thumbnails without having to create additional files( I have already put this feature to better use in the Slider Component <img src='http://developer.expressionz.in/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>Using the CSS Clip property, you can create a clipping using the rect shape. Like many other CSS Properties (like margin, padding etc),using rect requires four coordinates Top, Right, Bottom, Left (TRBL). The croocked nature of this property reflects when you take a closer look at how clip calculates the clipping region , using these four coordinates (sends brain into a toss for a while). Now to confuse you the bottom starts from the top, and the right starts from the left. <img src='http://developer.expressionz.in/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . You see what i said? &#8230;. Hence this post &#8230;</p>
<p>This little confusion can easily disappear , with this visual explanation of the CSS Clip/rect property as below!!!!</p>
<h4>CSS Clip Requirements</h4>
<p>The task we have started is to clip the following Thumbnail image into a squarer looking image (and also a wide-angle image)</p>
<table border="0">
<tbody>
<tr>
<td width="260" align="center" valign="middle"><img class="alignnone size-full wp-image-56" title="original_image" src="http://developer.expressionz.in/blogs/wp-content/uploads/2009/02/original_image.jpg" alt="original_image" width="220" height="150" /> </td>
<td><img class="alignnone size-full wp-image-58" title="clip_demo" src="http://developer.expressionz.in/blogs/wp-content/uploads/2009/02/clip_demo.jpg" alt="clip_demo" width="300" height="200" /></td>
</tr>
<tr>
<td><strong>Original Thumbnal/Image</strong></td>
<td><strong>Clip Requirements for Sqaure Thumbmail</strong></td>
</tr>
</tbody>
</table>
<p> </p>
<h4>CSS Clip Results</h4>
<p><img class="alignnone size-full wp-image-59" title="clip_results" src="http://developer.expressionz.in/blogs/wp-content/uploads/2009/02/clip_results.jpg" alt="clip_results" width="450" height="122" /></p>
<p><strong><a href="http://developer.expressionz.in/downloads/understanding_css_clip_property/understanding_css_clip_property.html">View Demo</a>  | </strong> <strong><a href="http://developer.expressionz.in/blogs/wp-content/plugins/download-monitor/download.php?id=13">Download sourcefiles</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2009/02/17/understandng-the-css-clip-property/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Vertically (and horizontally) Center Aligning Content in a DIV using CSS</title>
		<link>http://developer.expressionz.in/blogs/2008/10/12/vertically-and-horizontally-center-aligning-content-in-a-div-using-css/</link>
		<comments>http://developer.expressionz.in/blogs/2008/10/12/vertically-and-horizontally-center-aligning-content-in-a-div-using-css/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 19:35:38 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[UI Components]]></category>
		<category><![CDATA[Alignment]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=41</guid>
		<description><![CDATA[
			
				
			
		
Before we had to deal with CSS to create our page layouts,  aligning some content inside a table cell seemed just child&#8217;s play. Simply set the “align” or “valign” property of the table to have the alignment of your choice, piece of cake!
With CSS layouts, though we have “vertical-align” property for the elements, it [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F10%2F12%2Fvertically-and-horizontally-center-aligning-content-in-a-div-using-css%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F10%2F12%2Fvertically-and-horizontally-center-aligning-content-in-a-div-using-css%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Alignment,Tutorials" height="61" width="50" /><br />
			</a>
		</div>
<p>Before we had to deal with CSS to create our page layouts,  aligning some content inside a table cell seemed just child&#8217;s play. Simply set the “<strong>align</strong>” or “<strong>valign</strong>” property of the table to have the alignment of your choice, piece of cake!<br />
With CSS layouts, though we have “vertical-align” property for the elements, it doesn’t seem to be as simple as the “<strong>align</strong>” or “<strong>valign</strong>” properties. To be more specifiic the “<strong>vertical-align</strong>” never seems to solve any of your problems, especially if are write a piece of cross-browser CSS.</p>
<p>Without the use of HTML Tables, THE PROBLEM of centering on object, be it an image or some text within a containing division, has probably been every UI/CSS developers nightmare at some point. This problem further extrapolates your worries of aligning, if the object to be centered is dynamic in nature, i.e. when its height is variable(unknown height).</p>
<p>Though there is no known straight forward solution that would work across the range of browsers we have to deal with, the solution that I have tried to arrive at does seem to work in the few browsers that I have tried it in ( IE6, IE 7, FF).</p>
<p><strong>SOLUTION:</strong><br />
In browsers like Mozilla, Opera and Safari, The strange behaving “<strong>vertical-align</strong>” property can be brought to its senses, simply by setting the “<strong>display</strong>” property of the containing division to “<strong>table-cell</strong>” (display: table-cell).</p>
<p>The problem still remains with IE family of browsers, who, yet do not seem to understand what to with the “<strong>table-cell</strong>” property and ignorant as they are, they just ignore it. The solution given below, though simple, ads a few more DOM elements to your HTML to make things happen.</p>
<blockquote><p><strong>The CSS and HTML looks like this</strong><br />
<code>.outer_container {<br />
display: table;<br />
text-align:center;<br />
height: 140px;<br />
width:140px;<br />
position: relative;<br />
overflow: hidden;<br />
float:left;<br />
margin:0px 10px 0px 0px;<br />
}<br />
.obj_container {<br />
display: table-cell;<br />
vertical-align: middle;<br />
#position: absolute;<br />
#top: 50%;<br />
#left:50%;<br />
}<br />
.obj{<br />
#position: relative;<br />
#top: -50%;<br />
#left:-50%;<br />
margin:0px auto 0px auto;<br />
}</code></p>
<p><strong>HTML: -</strong><br />
&lt;div class=&#8221;outer_container&#8221; &gt;<br />
&lt;div class=&#8221;obj_container&#8221; &gt;<br />
&lt;div class=&#8221;obj&#8221;&gt; &lt;img src=&#8221;image1.jpg&#8221;/&gt;&lt;br/&gt; views :3456 &lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;</p></blockquote>
<p><strong>The result looks like this:-</strong></p>
<p><img src="http://developer.expressionz.in/images/HTML_CSS_vertical_align_vertical_middle_aligned_images.png" alt="HTML_CSS_vertical_align_vertical_middle_aligned_images" width="497" height="155" /></p>
<p><strong><a href="http://developer.expressionz.in/downloads/vertical_align_using_css/vertical_middle_aligned_images.html" target="_new">view the demo here </a> | <a href="http://developer.expressionz.in/blogs/wp-content/plugins/download-monitor/download.php?id=6'">Download Source Files</a> (Downloaded 304 times)</strong></p>
<hr /><strong>Understanding the solution:</strong><br />
For the browsers that understand <strong>display: table</strong> and <strong>display:table-cell</strong> properties, it seldom needs any explanation. For IE, with the use an IE specific hack (<strong>hash hack</strong>), we absolutely position the object container (<strong>obj_container</strong>) in half of the available height. Then object(<strong>obj</strong>) within is position relatively and  is moved up by half of its height … Well! I seem to understand the look the on your face, but It works. Try it!<br />
The above techniques  are combined to give us the above cross browser solution.</p>
<hr />The CSS can be easily modified as below to achieve, <strong>vertical-align:top </strong>or <strong>vertical-align:bottom</strong></p>
<blockquote><p><strong>TOP Align CSS </strong><br />
<code>.obj_container_top {<br />
display: table-cell;<br />
vertical-align: top;<br />
#position: absolute;<br />
#top: 0%;<br />
#left:50%;<br />
}<br />
.obj_top{<br />
#position: relative;<br />
#top: 0%;<br />
#left:-50%;<br />
margin:5px auto 0px auto;<br />
font-family:Verdana, Arial, Helvetica, sans-serif;<br />
font-size:10px;<br />
color:#cccccc;<br />
}</code></p>
<p><strong>HTML: -</strong><br />
&lt;div class=&#8221;outer_container&#8221; &gt;<br />
&lt;div class=&#8221;obj_container_top&#8221; &gt;<br />
&lt;div class=&#8221;obj_top&#8221; &gt; &lt;img src=&#8221;image1.jpg&#8221;/&gt;&lt;br/&gt; views :1234 &lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;</p></blockquote>
<p><strong>The result looks like this:-</strong></p>
<p><img src="http://developer.expressionz.in/images/HTML_CSS_vertical_align_vertical_top_aligned_images.png" alt="HTML_CSS_vertical_align_vertical_top_aligned_images" width="498" height="155" /></p>
<blockquote><p><strong>BOTTOM Align CSS </strong><br />
<code>.obj_container_bottom {<br />
display: table-cell;<br />
vertical-align: bottom;<br />
#position: absolute;<br />
#bottom: 0%;<br />
#left:50%;<br />
}<br />
.obj_bottom {<br />
#position: relative;<br />
#bottom: 0%;<br />
#left:-50%;<br />
margin:5px auto 0px auto;<br />
}</code><br />
<strong>HTML: -</strong><br />
&lt;div class=&#8221;outer_container&#8221; &gt;<br />
&lt;div class=&#8221;obj_container_bottom&#8221; &gt;<br />
&lt;div class=&#8221;obj_bottom&#8221; &gt; &lt;img src=&#8221;image1.jpg&#8221;/&gt;&lt;br/&gt;views :1234 &lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;</p></blockquote>
<p><strong>The result looks like this:-</strong></p>
<p><img src="http://developer.expressionz.in/images/HTML_CSS_vertical_align_vertical_bottom_aligned_images.png" alt="HTML_CSS_vertical_align_vertical_bottom_aligned_images" width="497" height="160" /></p>
<p><strong><a href="http://developer.expressionz.in/downloads/vertical_align_using_css/vertical_middle_aligned_images.html" target="_new">view the demo here </a> | <a href="http://developer.expressionz.in/blogs/wp-content/plugins/download-monitor/download.php?id=6">Download here </a></strong></p>
<hr />
<strong>Horizontal centering of the object simply achieved with the margin property , by setting the  margin-left and the margin-right to  auto</strong></p>
<p>Seems like ages, since I was trying to find a reasonable solution to this alignment problem. But now with this solution, I feel at little peace.</p>
<p><strong>With a hope that someday</strong></p>
<ul>
<li>vertical-alignment property in CSS will work like it does inside a table cell, WITHOUT having to beat much around the bush</li>
<li>At least, setting margin –top:auto and margin-bottom:auto, will give as the same result as with margin-left and the margin-right set to auto</li>
<li>The Browser wars will be over some day.</li>
<li>There will just ONE Browser for ALL.</li>
</ul>
<p><strong><a href="http://developer.expressionz.in/blogs/wp-content/plugins/download-monitor/download.php?id=6">Download the CSS and HTML of the above solution here</a> (Downloaded 304 times) ..for understandability, the CSS is not been optimized</strong></p>
<p>PS: And by the way, those are thumbnails of some pictures I have clicked&#8230; <img src='http://developer.expressionz.in/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/10/12/vertically-and-horizontally-center-aligning-content-in-a-div-using-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tokenizing Delimited String inside an XSL</title>
		<link>http://developer.expressionz.in/blogs/2008/08/13/tokenizing-delimited-string-inside-an-xsl/</link>
		<comments>http://developer.expressionz.in/blogs/2008/08/13/tokenizing-delimited-string-inside-an-xsl/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 10:15:09 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[XSL]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=30</guid>
		<description><![CDATA[If your requirement is to split a node value in an XML, that contains a delimited string of value, into individual items, then you have reached the right place … have a look at the example below. If you are familiar with a little bit of XML and XSL … I don’t think you would need any explanation.
Also, this example includes usage of XSL functions like xsl:call-template , xsl:substring-before, xsl:substring-after, if that’s what you are after.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F08%2F13%2Ftokenizing-delimited-string-inside-an-xsl%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F08%2F13%2Ftokenizing-delimited-string-inside-an-xsl%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Tutorials,XSLT" height="61" width="50" /><br />
			</a>
		</div>
<p>If your requirement is to split a node value in an XML, that contains a delimited string of value, into individual items, then you have reached the right place … have a look at the example below. If you are familiar with a little bit of XML and XSL … I don’t think you would need any explanation.<br />
Also, this example includes usage of XSL functions like xsl:call-template , xsl:substring-before, xsl:substring-after, if that’s what you are after.</p>
<p><strong>XML to be transformed (food.xml):-</strong><br />
Assume the task is to tokenize the string delimited by comma, in the the tag &#8220;keywords&#8221;</p>
<blockquote><p><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;<br />
&lt;?xml-stylesheet type="text/xsl" href="food.xsl"?&gt;<br />
&lt;food&gt;<br />
&lt;date&gt;July 2008&lt;/date&gt;<br />
&lt;description&gt;All about things we eat everyday&lt;/description&gt;<br />
<strong>&lt;keywords&gt;Fruits, Vegetables, Pulses, Meat, Cereals &lt;/keywords&gt;</strong><br />
&lt;/food&gt;</code></p></blockquote>
<p><strong>XSL (food.xsl):-</strong></p>
<blockquote><p><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br />
&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;<br />
&lt;xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/&gt;<br />
&lt;xsl:template match="/"&gt;<br />
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"/&gt;<br />
&lt;title&gt;XSL 1.0 Delimited String Tokeniser&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;xsl:value-of select="food/meta"/&gt;<br />
&lt;div &gt;<br />
<strong>&lt;xsl:call-template name="tokenize"&gt;<br />
&lt;xsl:with-param name="string" select="food/keywords" /&gt;<br />
&lt;xsl:with-param name="delimitr" select="','" /&gt;<br />
&lt;/xsl:call-template&gt;</strong><br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
&lt;/xsl:template&gt;<br />
&lt;xsl:template name="tokenize"&gt;<br />
&lt;xsl:param name="string" /&gt;<br />
&lt;xsl:param name="delimitr" /&gt;<br />
&lt;xsl:choose&gt;<br />
&lt;xsl:when test="contains($string, $delimitr)"&gt;<br />
&lt;div style="border:1px solid red;"&gt;<br />
&lt;h3&gt;&lt;xsl:value-of select="substring-before($string,$delimitr)" /&gt;&lt;/h3&gt;<br />
&lt;xsl:variable name="data" select="substring-before($string,$delimitr)"/&gt;<br />
&lt;/div&gt;<br />
&lt;xsl:call-template name="tokenize"&gt;<br />
&lt;xsl:with-param name="string" select="substring-after($string, $delimitr)" /&gt;&lt;xsl:with-param name="delimitr" select="$delimitr" /&gt;&lt;/xsl:call-template&gt;<br />
&lt;/xsl:when&gt;<br />
&lt;xsl:otherwise&gt;<br />
&lt;div style="border:1px solid red;"&gt;<br />
&lt;h3&gt;&lt;xsl:value-of select="$string" /&gt;&lt;/h3&gt;<br />
&lt;/div&gt;<br />
&lt;/xsl:otherwise&gt;<br />
&lt;/xsl:choose&gt;<br />
&lt;/xsl:template&gt;<br />
&lt;/xsl:stylesheet&gt;</code></p></blockquote>
<p>Resultant output HTML :-</p>
<blockquote><p><code>&lt;div&gt;<br />
&lt;div style="border: 1px solid red;"&gt;<br />
&lt;h3&gt;Fruits&lt;/h3&gt;<br />
&lt;/div&gt;<br />
&lt;div style="border: 1px solid red;"&gt;<br />
&lt;h3&gt; Vegetables&lt;/h3&gt;<br />
&lt;/div&gt;<br />
&lt;div style="border: 1px solid red;"&gt;<br />
&lt;h3&gt; Pulses&lt;/h3&gt;<br />
&lt;/div&gt;<br />
&lt;div style="border: 1px solid red;"&gt;<br />
&lt;h3&gt; Meat&lt;/h3&gt;<br />
&lt;/div&gt;<br />
&lt;div style="border: 1px solid red;"&gt;<br />
&lt;h3&gt; Cereals &lt;/h3&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;</code></p></blockquote>
<p>Needless to say &#8230; just change the  parameter &#8220;delimitr&#8221; to the delimiter of your choice</p>
<div style="text-align:right;"><strong><a href="http://developer.expressionz.in/blogs/wp-content/plugins/download-monitor/download.php?id=2">Download the above sample source files here</a></strong></div>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/08/13/tokenizing-delimited-string-inside-an-xsl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>White Space Bug in Line/List Items(li) in IE6</title>
		<link>http://developer.expressionz.in/blogs/2008/06/20/white-space-bug-in-linelist-itemsli-in-ie6/</link>
		<comments>http://developer.expressionz.in/blogs/2008/06/20/white-space-bug-in-linelist-itemsli-in-ie6/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 10:19:11 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[Browser Quirks]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE Bugs]]></category>
		<category><![CDATA[IE Fixes]]></category>
		<category><![CDATA[IE Hacks]]></category>
		<category><![CDATA[IE Issues]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=44</guid>
		<description><![CDATA[If you  have ever made ( or making one) a Vertical Menu using list items( li) tags and CSS, you  might encounter, this yet another bug in Internet Explorer, where IE 6 inserts these gaps between list items that contain block level elements, i.e. if there is any whitespace between the list items in the markup.  Thanks, but no thanks , the IE version 7  seems free from this bug.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F06%2F20%2Fwhite-space-bug-in-linelist-itemsli-in-ie6%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F06%2F20%2Fwhite-space-bug-in-linelist-itemsli-in-ie6%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=IE+Bugs,IE+Fixes,IE+Hacks,IE+Issues,IE6,Tutorials" height="61" width="50" /><br />
			</a>
		</div>
<p>If you  have ever made ( or making one) a Vertical Menu using list items( li) tags and CSS, you  might encounter, this yet another bug in Internet Explorer, where IE 6 inserts these gaps between list items that contain block level elements, i.e. if there is any whitespace between the list items in the markup.  Thanks, but no thanks , the IE version 7  seems free from this bug.<br />
If like me , and many more, you  belong to this  band of frustrated developers , who still have to get their new layouts , working in IE6 too, then this might prove useful . Have a look…</p>
<blockquote><p><strong>Sample markup</strong>:</p>
<p>&lt;ul id=&#8221;menu&#8221;&gt;<br />
&lt;li &gt;&lt;a href=&#8221;#&#8221;&gt;Home&lt;/a&gt;&lt;/li&gt;<br />
&lt;li &gt;&lt;a href=&#8221;#&#8221;&gt;About&lt;/a&gt;&lt;/li&gt;<br />
&lt;li &gt;&lt;a href=&#8221;#&#8221;&gt;Services&lt;/a&gt;&lt;/li&gt;<br />
&lt;li &gt;&lt;a href=&#8221;#&#8221;&gt;Portfolio&lt;/a&gt;&lt;/li&gt;<br />
&lt;li &gt;&lt;a href=&#8221;#&#8221;&gt;FAQ&lt;/a&gt;&lt;/li&gt;<br />
&lt;li &gt;&lt;a href=&#8221;#&#8221;&gt;Contact Us&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</p></blockquote>
<p>You might create some CSS , similar to one below, to transfrom the above  markup into a vertical menu ….</p>
<blockquote><p><strong>Sample CSS…</strong><br />
#menu {<br />
margin: 0;padding: 0;background: #FF9900;<br />
list-style-type: none;width: 150px;<br />
}<br />
#menu li {margin: 0;padding: 0;}<br />
#menu  a {display: block;<br />
color: #555555;<br />
text-decoration: none;<br />
padding: 0 15px;<br />
line-height: 2.5; border-bottom:1px solid #FFF;<br />
}</p></blockquote>
<p>The results you will see…<br />
<img src="http://developer.expressionz.in/images/white_space_bug_in_ie6.gif" alt="null" /></p>
<blockquote><p><strong>Solution for this bug&#8230;(modified/added CSS in bold italics)</strong></p>
<p>#menu {<br />
   margin: 0;padding: 0;background: #FF9900;list-style-type: none;width: 150px;<br />
<em><strong>  float: left; /* this contains floated list items */</strong></em><br />
}<br />
#menu li {<br />
    margin: 0;padding: 0;<br />
<strong><em>   float: left;      /* This fixes the */<br />
   width: 100%;  /*  whitespace bug in IE6 */<br />
</em></strong>}<br />
#menu a {<br />
   display: block; color: #555555;<br />
   text-decoration: none;<br />
   padding: 0 15px;<br />
   line-height: 2.5; border-bottom:1px solid #FFF;<br />
}</p></blockquote>
<p>If the above solution doesnot seem to work (for reasons known to IE6 only)&#8230; try this method instead</p>
<blockquote><p><strong>Just add this additional IE6 only styles to your markup &#8230;</strong></p>
<p><strong>&lt;!&#8211;[if lt IE 7&gt;<br />
</strong>&lt;style type="text/css"&gt;<br />
#menu li a {display:inline-block;}<br />
#menu li a {display:block;}<br />
&lt;/style&gt;<br />
&lt;![endif]&#8211;&gt;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/06/20/white-space-bug-in-linelist-itemsli-in-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Include XSL inside XSL</title>
		<link>http://developer.expressionz.in/blogs/2008/05/04/include-xsl-inside-xsl/</link>
		<comments>http://developer.expressionz.in/blogs/2008/05/04/include-xsl-inside-xsl/#comments</comments>
		<pubDate>Sun, 04 May 2008 09:48:51 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[XSL]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XSL Includes]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=16</guid>
		<description><![CDATA[Imagine you are creating a website (and using XML, XSL transfroms ofcourse) and most of the pages would have a <strong>Comments Module </strong>. Well! then either you copy or paste this code into every page template or even better you create an INCLUDE file can call it where ever you want it in your main page template...<strong>So HOW DO WE INCLUDE a XSL file inside another XSL file</strong>? Here is how...]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F05%2F04%2Finclude-xsl-inside-xsl%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F05%2F04%2Finclude-xsl-inside-xsl%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Tutorials,XML,XSL,XSL+Includes,XSLT" height="61" width="50" /><br />
			</a>
		</div>
<p>If XML/XSL Transforms is your domian, then there are times when we want a peice of Dynamic code to be used library item(to be made re-usable). What I mean , probably could be made more clear with this example scenario.</p>
<p>Imagine you are creating a website (and using XML, XSL transfroms ofcourse) and most of the pages would have a <strong>Comments Module </strong>. Well! then either you copy or paste this code into every page template (which I dont have say, but make maintenance and rework a nightmare) or even better, you create an INCLUDE file which could be pulled in where ever you want it in your page(s)&#8230;<br />
<strong>So HOW DO WE CREATE a XSL INCLUDE file and include it inside another XSL file</strong>? Here is how&#8230;</p>
<p>Just to make things clear &#8230; here is quick list of files that you would create &#8230; here , we will be including info about fruits and vegetables into a parent page called food.</p>
<p>1. food.xml &#8211; xml data file on which the transformation will be applied<br />
2. food.xsl  -  main XSL file, which will transform our food.xml<br />
3. inc_fruits.xsl &#8211; XSL include file that will render fruits data<br />
4. inc_vegtables.xsl &#8211; XSL include file that will render vetetables data</p>
<p>I dont think I have explain much , the codes for above elements , will be self explanatory&#8230;</p>
<p><strong>FOOD.XML</strong></p>
<blockquote>
<div><code><br />
&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;<br />
&lt;?xml-stylesheet type="text/xsl" href="food.xsl"?&gt;<br />
&lt;food&gt;<br />
&lt;date&gt;July 2008&lt;/date&gt;<br />
&lt;description&gt;All about things we eat everyday&lt;/description&gt;<br />
&lt;fruits type="tropical"&gt;<br />
&lt;item name="mango" moreinfo="http://www.mango.com"&gt;Mango is the king of fruits&lt;/item&gt;<br />
&lt;item name="banana" moreinfo="http://www.banana.com"&gt;Banana once a day , keeps the doctor away&lt;/item&gt;<br />
&lt;item name="orange" moreinfo="http://www.orange.com"&gt;Orange is the color and rich in vitamin C&lt;/item&gt;<br />
&lt;item name="Papaya" moreinfo="http://www.papaya.com"&gt;Papaya - Hot when raw, cold when ripe&lt;/item&gt;<br />
&lt;/fruits&gt; </code></div>
<p><code>&lt;vegetables&gt;<br />
&lt;item name="spinach" moreinfo="http://www.spinach.com"&gt;Spinach is full of iron&lt;/item&gt;<br />
&lt;item name="asparagus" moreinfo="http://www.asparagus.com"&gt;Asparagus contains loads of vitamin D &lt;/item&gt;<br />
&lt;item name="fenugreek" moreinfo="http://www.fenugreek.com"&gt;Fenugreek is rich in vitamin C&lt;/item&gt;<br />
&lt;/vegetables&gt;<br />
&lt;/food&gt;</p>
<p></code></p></blockquote>
<hr />
<strong>FOOD.XSL</strong></p>
<blockquote>
<div><code><br />
&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;<br />
&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;<br />
&lt;xsl:include href="inc_fruits.xsl" /&gt;<br />
&lt;xsl:include href="inc_vegetables.xsl" /&gt;<br />
&lt;xsl:template match="/"&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Title&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h3&gt;&lt;xsl:value-of select="/food/description" /&gt;&lt;/h3&gt;<br />
Modification Date : &lt;xsl:value-of select="/food/date" /&gt;<br />
&lt;hr/&gt;<br />
&lt;h5&gt; About Fruits&lt;/h5&gt;<br />
&lt;xsl:call-template name="about_fruits"/&gt;</code></div>
<p><code>&lt;hr/&gt;<br />
&lt;h5&gt; About Vegetables&lt;/h5&gt;<br />
&lt;xsl:call-template name="about_vegetables"/&gt;</p>
<p>&lt;hr/&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
&lt;/xsl:template&gt;<br />
&lt;/xsl:stylesheet&gt;</p>
<p> </p>
<p></code></p></blockquote>
<hr />
<strong>INC_FRUITS.XSL</strong></p>
<blockquote><p><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br />
&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;<br />
&lt;xsl:output method="html" encoding="iso-8859-1" /&gt;<br />
&lt;xsl:template name="about_fruits"&gt;<br />
&lt;xsl:for-each select="/food/fruits/item/@*"&gt;<br />
attribute name : &lt;xsl:value-of select="name()"/&gt; <br />
attribute value : &lt;xsl:value-of select="."/&gt; &lt;br /&gt;<br />
&lt;/xsl:for-each&gt;<br />
&lt;/xsl:template&gt;<br />
&lt;/xsl:stylesheet&gt;</code></p></blockquote>
<hr />
<strong>INC_VEGETABLES.XSL</strong></p>
<blockquote><p><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br />
&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;<br />
&lt;xsl:output method="html" encoding="iso-8859-1" /&gt;<br />
&lt;xsl:template name="about_vegetables"&gt;<br />
&lt;xsl:for-each select="/food/vegetables/item/@*"&gt;<br />
attribute name : &lt;xsl:value-of select="name()"/&gt; <br />
attribute value : &lt;xsl:value-of select="."/&gt; &lt;br/&gt;<br />
&lt;/xsl:for-each&gt;<br />
&lt;/xsl:template&gt;<br />
&lt;/xsl:stylesheet&gt;</code></p></blockquote>
<p><strong><a title="download" href="http://developer.expressionz.in/blogs/wp-content/plugins/download-monitor/download.php?id=5" target="_blank">Download all the above files here (88 downloads)</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/05/04/include-xsl-inside-xsl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Cross Browser Minimum Height Hack</title>
		<link>http://developer.expressionz.in/blogs/2008/04/12/css-cross-browser-minimum-height-hack/</link>
		<comments>http://developer.expressionz.in/blogs/2008/04/12/css-cross-browser-minimum-height-hack/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 17:11:25 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE Bugs]]></category>
		<category><![CDATA[IE Fixes]]></category>
		<category><![CDATA[IE Hacks]]></category>
		<category><![CDATA[IE Issues]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=42</guid>
		<description><![CDATA[For some of us poor developers, who still are required to code CSS that must also work in IE6, un-availability of the "min-height" , could prove a show stopper sometime... Donot despair.  

Fortunately, we have enough quirks in IE , that we would use to out advantage and hack our way through to reach our goal...i.e. make a DIVISION division as though its min-height in IE6
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F04%2F12%2Fcss-cross-browser-minimum-height-hack%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F04%2F12%2Fcss-cross-browser-minimum-height-hack%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=IE+Bugs,IE+Fixes,IE+Hacks,IE+Issues,IE6,Tutorials" height="61" width="50" /><br />
			</a>
		</div>
<p>Post IE 6 , MSIE has been kind enough to us UI developers by adding a few more CSS properties standard to most other standard browsers. One such usefull property in &#8220;min-height&#8221;.  Pretty straight forward property that needs no long winded explanation. When a <strong>min-height</strong> for a division is set, it always retains that set height when the content it houses occupies less than it can hold and importantly ( unlike the plain vanilla <strong>&#8220;height&#8221;</strong> property ) scales or in CSS words, it behaves like a division whose <strong>&#8220;height&#8221;</strong> is set to &#8220;auto&#8221;&#8230;</p>
<p>For some of us poor developers, who still are required to code CSS that must also work in IE6, un-availability of the &#8220;<strong>min-height</strong>&#8221; , could prove a show stopper sometime&#8230; Donot despair.  </p>
<p>Fortunately, we have enough quirks in IE , that we would use to out advantage and hack our way through to reach our goal&#8230;i.e. <strong>make a DIVISION division as though its min-height in IE6</strong></p>
<blockquote><p><strong>Solution 1 : Using the Underscore Hack [<a href="http://developer.expressionz.in/blogs/?p=7"> ...Read more</a>]</strong><br />
<code><br />
.box1 {<br />
min-height: 200px;<br />
height:auto;<br />
_height:200px;<br />
}</code></p>
<p><strong>HTML : - </strong><code><br />
&lt;div class="box1"&gt;Some dynamic content with variable height ...&lt;/div&gt;</code></p>
<hr /> <strong>Solution 2: Using the CSS Attribute Selector Hack</strong><br />
<code><br />
.box2 {<br />
min-height:200px;<br />
height:200px;<br />
}<br />
div[class] .box2 {<br />
height:auto;<br />
}<br />
</code><br />
<strong>HTML:-<br />
</strong><code>&lt;div class="someclass"&gt;<br />
&lt;div class="box2 common"&gt;Some dynamic content with variable height ...&lt;/div&gt;<br />
&lt;/div&gt;<br />
 </code></p></blockquote>
<p> The CSS Attribute Selector Hack takes advantage of the fact the browsers earlier tha IE6 ignored an atribute-selector. Note the requirement of another container division with <strong>class=&#8221;someclass&#8221; </strong>. Just the presense of the <strong>class attribute </strong>for this division, overrides the height back to auto for Opera, Mozilla and MSIE7 and later. IE6, which doesn&#8217;t support atribute selectors, ignores it.</p>
<p><strong><a href="http://developer.expressionz.in/downloads/hacks/css_min_height_hack.html" target="_new">View Demo of the min-height hack for IE6</a><br />
</strong></p>
<hr />
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/04/12/css-cross-browser-minimum-height-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with XML Node Attributes in XSLT</title>
		<link>http://developer.expressionz.in/blogs/2008/04/04/working-with-xml-node-attributes-in-xslt/</link>
		<comments>http://developer.expressionz.in/blogs/2008/04/04/working-with-xml-node-attributes-in-xslt/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 08:17:25 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[XSL]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XML Attributes]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=15</guid>
		<description><![CDATA[If you use XML and XSL, then you might have come across a time , when you have to play around with attributes and values of XML nodes in you XSL. They are loads of sites with long winded info about this, but none I found were brief and precise ... This is NO XML/XSL TUTORIAL,but my attempt to put-together some sort of cheat list ...
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F04%2F04%2Fworking-with-xml-node-attributes-in-xslt%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F04%2F04%2Fworking-with-xml-node-attributes-in-xslt%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Tutorials,XML,XML+Attributes,XSL,XSLT" height="61" width="50" /><br />
			</a>
		</div>
<p>If you use XML and XSL, then you might have come across a time , when you have to play around with attributes and values of XML nodes in you XSL. They are loads of sites with long winded info about this, but none I found were brief and precise &#8230; This is NO XML/XSL TUTORIAL,but my attempt to put-together some sort of cheat list &#8230;</p>
<p>The sample XML that we will working with looks like this&#8230;</p>
<blockquote><p><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;<br />
&lt;?xml-stylesheet type="text/xsl" href="food.xsl"?&gt;<br />
&lt;food&gt;<br />
&lt;fruits type="tropical"&gt;<br />
&lt;item name="mango" moreinfo="http://www.mango.com"&gt;Mango is the king of fruits&lt;/item&gt;<br />
&lt;item name="banana" moreinfo="http://www.banana.com"&gt;Banana once a day , keeps the doctor away&lt;/item&gt;<br />
&lt;item name="orange" moreinfo="http://www.orange.com"&gt;Orange is the color and rich in vitamin C&lt;/item&gt;<br />
&lt;item name="Papaya" moreinfo="http://www.papaya.com"&gt;Papaya - Hot when raw, cold when ripe&lt;/item&gt;<br />
&lt;/fruits&gt;<br />
&lt;/food&gt;</code></p></blockquote>
<p>So Lets begin transforming our above XML using XSL</p>
<p><strong>Example 1 : Displaying value at a chosen Attribute</strong></p>
<blockquote><p><code>&lt;xsl:value-of select="/food/fruits/item[@name='orange']" /&gt;&lt;br /&gt;<br />
to get more information about &lt;a href="{/food/fruits/item[@name='orange']/@moreinfo}" target="new" &gt;&lt;xsl:value-of select="/food/fruits/item[@name='orange']/@name" /&gt; &lt;/a&gt;</code></p></blockquote>
<p>HTML result will look like</p>
<blockquote><p><code>Orange is the color and rich in vitamin C,<br />
to get more information about &lt;a href="http://www.orange.com" target="new"&gt;</code></p></blockquote>
<hr/>
<p><strong>Example 2 : Looping through and displaying all XML Attribute Names and their Values</strong></p>
<blockquote><p> <code>&lt;xsl:for-each select="/food/fruits/item/@*"&gt;<br />
  attribute name : &lt;xsl:value-of select="name()"/&gt;,&#160;<br />
    attribute value : &lt;xsl:value-of select="."/&gt;&#160; &lt;br /&gt;<br />
  &lt;/xsl:for-each&gt;</code></p></blockquote>
<p>HTML result will look like</p>
<blockquote><p><code><br />
attribute name : name,  attribute value : mango<br />
attribute name : moreinfo,  attribute value : http://www.mango.com<br />
attribute name : name,  attribute value : banana<br />
attribute name : moreinfo,  attribute value : http://www.banana.com<br />
attribute name : name,  attribute value : orange<br />
attribute name : moreinfo, attribute value : http://www.orange.com<br />
attribute name : name,  attribute value : Papaya<br />
attribute name : moreinfo,  attribute value : http://www.papaya.com<br />
</code></p></blockquote>
<hr/>
<strong><a title="download" href="http://developer.expressionz.in/blogs/wp-content/plugins/download-monitor/download.php?id=4" target="_blank">Download all the above files here (111 downloads)</a></strong></p>
<p><br/><br />
Watch this space, I&#8217;ll keep updating this with new findings&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/04/04/working-with-xml-node-attributes-in-xslt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What are CSS Resets?</title>
		<link>http://developer.expressionz.in/blogs/2008/03/11/what-are-css-resets/</link>
		<comments>http://developer.expressionz.in/blogs/2008/03/11/what-are-css-resets/#comments</comments>
		<pubDate>Mon, 10 Mar 2008 19:40:56 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Resets]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=27</guid>
		<description><![CDATA[
			
				
			
		
A CSS Reset is/are CSS to set a number of element styles to a specific baseline that creates consistency across various browsers.
We all  have been the through the nightmares of writing cross-browser CSS&#8217;s.  So when we start writing our CSS , It is a practice to reset it first to remove/reset any cross browser inconsistencies.  [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F03%2F11%2Fwhat-are-css-resets%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F03%2F11%2Fwhat-are-css-resets%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=CSS,CSS+Resets,Tips+%26amp%3B+Tricks,Tutorials" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>A CSS Reset is/are CSS to set a number of element styles to a specific baseline that creates consistency across various browsers.</strong></p>
<p>We all  have been the through the nightmares of writing cross-browser CSS&#8217;s.  So when we start writing our CSS , It is a practice to reset it first to remove/reset any cross browser inconsistencies.  CSS Resets , are simple few lines of CSS that you begin your CSS with , giving you a clean base  to start building your  upon.</p>
<p>The CSS resets that I normally tend to use looks like this</p>
<blockquote><p><code>body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td {<br />
margin:0;<br />
padding:0;<br />
}<br />
html {font-size: 76%;}<br />
table {<br />
border-collapse:collapse;<br />
border-spacing:0;<br />
}<br />
fieldset, img {<br />
border:0;<br />
}</code></p>
<p>ol, ul {<br />
list-style:none;<br />
}</p>
<p>h1, h2, h3, h4, h5, h6 {<br />
font-size:100%;<br />
font-weight:normal;<br />
}</p></blockquote>
<p><strong><br />
Reset the browser font size</strong><br />
Also note the reset that has been applied to browser font size in the following line &#8230;</p>
<blockquote><p><code>html {font-size: 76%;}</code></p></blockquote>
<p>The above CSS resets the browser font size to 10 pixels, and this makes it possible to work with relative font sizes (which is every important from a WAI compliance prespective)<br />
For e.g., in the following definition, font-size in a span is set to 10 pixels and that in the paragarph is set to 14 pixels&#8230;</p>
<blockquote><p><code>span {font-size: 1em;}<br />
p {font-size: 1.4em;}</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/03/11/what-are-css-resets/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
