<?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>Productivedreams.com &#187; CSS Hacks</title>
	<atom:link href="http://www.productivedreams.com/tag/css-hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.productivedreams.com</link>
	<description>A blog to keep you updated on the latest design trends.</description>
	<lastBuildDate>Sat, 27 Mar 2010 04:09:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A simple CSS based usability tip for search buttons</title>
		<link>http://www.productivedreams.com/simple-css-based-usability-tip-for-search-buttons/</link>
		<comments>http://www.productivedreams.com/simple-css-based-usability-tip-for-search-buttons/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 11:59:09 +0000</pubDate>
		<dc:creator>Gopal Raju</dc:creator>
				<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Workshop]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Hacks]]></category>

		<guid isPermaLink="false">http://www.productivedreams.com/?p=1840</guid>
		<description><![CDATA[This is a small tip to improve the usability of search fields. I realized the need of this while working on a recent project and thought it was good enough to share with my readers   Do you have the habit of hitting the search button multiple times even before it loads the search [...]]]></description>
			<content:encoded><![CDATA[<p>This is a small tip to improve the usability of search fields. I realized the need of this while working on a recent project and thought it was good enough to share with my readers <span> <img src='http://www.productivedreams.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span></p><p>Do you have the habit of hitting the search button multiple times even before it loads the search results? Well&#8230; I used to do that and so do many other users. Clicking the search button multiple times results in additional server requests and slows down the page&#8217;s loading time. </p>
<h1>Why do users click again? </h1><p>Because they are users! They aren&#8217;t developers who understand what happens in the back end.</p><p>Its our job as developers/designers to let the user know that the results are being loaded and to ask them to wait until it loads.</p>
<h1>How do I do it with just CSS?</h1><p>Its pretty simple. Click and hold the search button below and see.</p><span id="more-1840"></span><br /><iframe src="http://www.productivedreams.com/wp-content/themes/pd/workshop/usable-search/" height="40px" scrolling="no" style="overflow:hidden;"><br /></iframe><p>I am sure, I don&#8217;t have to explain how it works for the experts, but if you are novice continue reading&#8230;</p><p>The trick is to use CSS sprites and show the animated loader image while the user clicks the button(on focus), indicating that the page is being loaded. You can download the sprite <a href="http://www.productivedreams.com/wp-content/themes/pd/workshop/usable-search/search-sprite.gif" target="_blank">here</a>. </p>
<h1>Now, how do I avoid multiple clicks?</h1><p>Its impossible to disable a button just with CSS, but we can ask the user to wait by replacing the hand/pointer with a &#8220;wait&#8221; cursor. So this is how the final CSS code looks like.</p>
<pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">01</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">02</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">input.submit{</pre></td></tr><tr><td class="devcodelines" width="1%">03</td><td class="devcodelinesarea"><pre class="devcode devcodeline">width:16px;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">04</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">height:16x;</pre></td></tr><tr><td class="devcodelines" width="1%">05</td><td class="devcodelinesarea"><pre class="devcode devcodeline">display:block;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">06</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">overflow:hidden;</pre></td></tr><tr><td class="devcodelines" width="1%">07</td><td class="devcodelinesarea"><pre class="devcode devcodeline">text-indent:-999px; /* To remove any default text on the button*/</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">08</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">line-height:16px; /* required for safari */</pre></td></tr><tr><td class="devcodelines" width="1%">09</td><td class="devcodelinesarea"><pre class="devcode devcodeline">background:url(search-sprite.gif) no-repeat 0 0; /* This will display the search icon by default */</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">10</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">cursor:pointer; /* Hand cursor for the normal state */</pre></td></tr><tr><td class="devcodelines" width="1%">11</td><td class="devcodelinesarea"><pre class="devcode devcodeline">border:none;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">12</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">padding:0;</pre></td></tr><tr><td class="devcodelines" width="1%">13</td><td class="devcodelinesarea"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">14</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">&nbsp;</pre></td></tr><tr><td class="devcodelines" width="1%">15</td><td class="devcodelinesarea"><pre class="devcode devcodeline">input.submit:hover{</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">16</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">background-position: 0 -16px; /* This will display the dark search icon on hover */</pre></td></tr><tr><td class="devcodelines" width="1%">17</td><td class="devcodelinesarea"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">18</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">&nbsp;</pre></td></tr><tr><td class="devcodelines" width="1%">19</td><td class="devcodelinesarea"><pre class="devcode devcodeline">input.submit:active{</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">20</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">background-position: 0 -32px; /* And finally, this is the one that shows the loader */</pre></td></tr><tr><td class="devcodelines" width="1%">21</td><td class="devcodelinesarea"><pre class="devcode devcodeline">cursor:wait; /* Shows the wait cursor on click */</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">22</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines" width="1%">23</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre><div class="downloadinfo"><br /><a class="downloadlink dlimg" href="http://www.productivedreams.com/wp-content/plugins/download-monitor/download.php?id=usable-search.zip" title="Version 1.0 downloaded 347 times" ><img src="" alt="Download CSS Based Usability Tip for Search Buttons Version 1.0" /></a> <br /></div><p>If you really want to disable the button, check out this <a href="http://jquery-howto.blogspot.com/2009/05/disable-submit-button-on-form-submit.html">JQuery solution</a>. And, don't forget to put in your thoughts and ideas.</p>
<div class="relposts"><h3>RELATED POSTS</h3><ul class="related_post"><li><a href="http://www.productivedreams.com/ie-css-hack-without-using-any-hacks/" title="IE CSS hack without using any hacks!">IE CSS hack without using any hacks!</a></li><li><a href="http://www.productivedreams.com/properties-that-were-impossible-to-implement-in-ie6/" title="10 CSS properties that &#8216;were&#8217; impossible to implement in IE6">10 CSS properties that &#8216;were&#8217; impossible to implement in IE6</a></li><li><a href="http://www.productivedreams.com/min-width-issue-in-ie6/" title="Min-width issue in IE6">Min-width issue in IE6</a></li><li><a href="http://www.productivedreams.com/common-requirements-for-website-design-and-corresponding-jquery-solutions/" title="3 common requirements/issues and the corresponding Jquery solutions for your next web project">3 common requirements/issues and the corresponding Jquery solutions for your next web project</a></li><li><a href="http://www.productivedreams.com/making-gallery-submissions-easy-for-designers/" title="Making gallery submissions easy for designers">Making gallery submissions easy for designers</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.productivedreams.com/simple-css-based-usability-tip-for-search-buttons/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>10 CSS properties that &#8216;were&#8217; impossible to implement in IE6</title>
		<link>http://www.productivedreams.com/properties-that-were-impossible-to-implement-in-ie6/</link>
		<comments>http://www.productivedreams.com/properties-that-were-impossible-to-implement-in-ie6/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 19:53:49 +0000</pubDate>
		<dc:creator>Gopal Raju</dc:creator>
				<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Workshop]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Hacks]]></category>

		<guid isPermaLink="false">http://www.productivedreams.com/?p=1090</guid>
		<description><![CDATA[Personally I hate IE6, and never wanted to support it. Unfortunately, a percentage of internet users still use IE6. Sometimes even customers get insistent about how their page should look in IE6. Anyways, let&#8217;s hope IE dies soon!<br />This post is about 10 commonly used css properties that were impossible to implement in IE6. While redesigning [...]]]></description>
			<content:encoded><![CDATA[<p>Personally I hate IE6, and never wanted to support it. Unfortunately, a percentage of internet users still use IE6. Sometimes even customers get insistent about how their page should look in IE6. Anyways, let&#8217;s hope IE dies soon!</p>
<img src="http://www.productivedreams.com/wp-content/uploads/2009/06/ie.jpg" alt="10 IE6 CSS Hacks" title="10 IE6 CSS Hacks" width="508" height="258" class="alignnone size-full wp-image-1142" /><p>This post is about 10 commonly used css properties that were impossible to implement in IE6. While redesigning ProductiveDreams, I came across a few css compatibility issues with IE6 and had to spend hours searching the solution for each issue. </p><p>So I just thought of putting them together to save your time. These css hacks (I would rather call them <strong>&#8217;solutions&#8217;</strong> since, not all of them are purely css based) solves the major compatibility issues in IE6.</p>
<h1>1. Rounded or Curved Corners</h1><p>As you would know, all modern browsers support border radius. Curved corner is something that was merely impossible to achieve in IE6. Recently I came across an htc file (especially for IE) developed by Remiz from HTMLRemix.com, which solves this issue.</p><p><strong>The first thing to do while using htc is to add the correct MIME type for htc behavior on your server. This is REALLY important before you proceed.</strong> The following are steps:</p>
1. Go to your cpanel and click the MIME Types link<br />2. Under MIME Type, add <strong>text/x-component</strong><br />3. Under Extensions, add <strong>htc</strong><br />4. Restart Apache Web server<p>For more details on how to add MIME type visit <a href="http://support.microsoft.com/kb/306231">Microsoft Support</a></p><p>All you need to do is download the htc from <a href="http://www.htmlremix.com/css/curved-corner-border-radius-cross-browser">HTMLremix</a> or <a href="http://code.google.com/p/curved-corner/">Alternate Link</a> and include the following code in your CSS.</p><div class="downloadinfo"><br /><a href="http://www.htmlremix.com/files/20080924-border-radius.zip" class="dlimg">Border Radius</a><br /><a href="http://www.productivedreams.com/workshop/border_radius/" title="CSS Rounded Corners" class="demo">Preview</a><br /></div>
<pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">.div_class_name{</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline">behavior:url(border-radius.htc);</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre><p><strong>Jquery Alternative:</strong><a href="http://www.malsup.com/jquery/corner/"> jQuery Corner</a> a jQuery plugin that creates crossbrowser compatible rounded corners!</p>
<h1>2. The popular PNG transparency issue</h1><p>Every designer would have faced this issue, obviously! Though there are a number of javascript based solutions, I couldn't find anything that supports background position. As far as I know all JS based solutions end up with the same result. This is something that worked flawlessly for me. All other solutions are based on this filter.</p><div class="downloadinfo"><br /><a class="downloadlink dlimg" href="http://www.productivedreams.com/wp-content/plugins/download-monitor/download.php?id=png_transparency.zip" title=" downloaded 763 times" ><img src="" alt="Download IE Png transparency fix " /></a><br /><a href="http://www.productivedreams.com/workshop/png_transparency/" title="PNG Transparency" class="demo">Preview</a><br /></div>
<pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">.class_name{</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline">_background:none;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">filter: progid:DXImageTransform.Microsoft.AlphaImageLoader (src='image_name.png', sizingMethod='scale');</pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">6</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre><p><strong>HTC Alternative:</strong>If the solution above doesn't work for you, you may try this <a href="http://www.twinhelix.com/css/iepngfix/">htc</a> alternate. </p><p><span class="strike"><strong>Known Issues:</strong><br />1. Doesn't support CSS Sprites: If you are using sprites, then just forget this hack. Background positions doesn't work with PNG hacks .</span></p><p>If you need background-position support for PNG, then go for <a href="http://www.dillerdesign.com/experiment/DD_belatedPNG/">DD_belated</a></p><p>The best solution is to use a .gif or png-8. Check out <a href="http://www.productivedreams.com/ie-css-hack-without-using-any-hacks/">the best way to do this</a> without using hacks!</p>
<h1>3. Opacity</h1><p>This is pretty much straight forward and easy to achieve compared to the other hacks. </p><div class="downloadinfo"><br /><a class="downloadlink dlimg" href="http://www.productivedreams.com/wp-content/plugins/download-monitor/download.php?id=opacity.zip" title=" downloaded 499 times" ><img src="" alt="Download Opacity in IE6 " /></a><br /><a href="http://www.productivedreams.com/workshop/opacity/" title="Opacity for IE6" class="demo">Preview</a><br /></div>
<pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">.opacity_div {</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline">  filter: alpha(opacity = 50);</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre>
<h1>4. Fixed position</h1><p>All browsers support the css property 'position:fixed', but not IE6. I had to find a solution for this since the social icons in this blog are having a fixed position.</p><div class="downloadinfo"><br /><a class="downloadlink dlimg" href="http://www.productivedreams.com/wp-content/plugins/download-monitor/download.php?id=fixed_position.zip" title=" downloaded 530 times" ><img src="" alt="Download Fixed position for IE6 " /></a><br /><a href="http://www.productivedreams.com/workshop/fixed_position/" title="Fixed Position" class="demo">Preview</a><br /></div>
<pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">* html .fixed_div{ </pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline">position: absolute; /* position fixed for IE6 */ </pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">top: expression(104+((e=document.documentElement.scrollTop)?e:document.body.scrollTop)+'px'); </pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline">left: expression(15+((e=document.documentElement.scrollLeft)?e:document.body.scrollLeft)+'px'); </pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">6</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">} </pre></td></tr><tr><td class="devcodelines" width="1%">7</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre><p>Just change the top(104) and left(15) values, to position the element.</p><p>This method works very well, but you would notice a jerk while scrolling the page. So here goes a fix for that.</p>
<pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">* html { </pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline">background-image: url(image.jpg); </pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">} </pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre><p>All you need is a 1px x 1px image. This might sound weird but it works!</p>
<h1>5. Min-width &#038; Max-width</h1><p>This is simple as well and was already <a href="http://www.productivedreams.com/min-width-issue-in-ie6/">posted on ProductiveDreams</a></p><div class="downloadinfo"><br /><a class="downloadlink dlimg" href="http://www.productivedreams.com/wp-content/plugins/download-monitor/download.php?id=min_max_width.zip" title=" downloaded 446 times" ><img src="" alt="Download Minimum and maximum width " /></a><br /><a href="http://www.productivedreams.com/workshop/min_max_width/" title="Minimum and Maximum Width" class="demo">Preview</a><br /></div>
<strong>Min-width:</strong><br /><pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">.div_class_name{</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline">width: expression(document.body.clientWidth &lt; 1000? &quot;1000px&quot; : &quot;auto&quot;);</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre>
<strong>Max-width:</strong><br /><pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">.div_class_name{</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline">width: expression(document.body.clientWidth &gt; 1000? &quot;1000px&quot; : &quot;auto&quot;);</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre><p><strong>Jquery Alternative:</strong> This is an alternative solution for the hack above.  <a href="http://davecardwell.co.uk/javascript/jquery/plugins/jquery-minmax/">JQminmax</a> is a cool plugin which allows you to set minimum and maximum values for both width and height. </p>
<h1>6. Hover for non anchor elements</h1><p>Unfortunately, IE6 supports :hover, only for anchor tags. That means css based dropdowns would not work in IE6. CSShover.htc is the best solution for this. You may download the htc file from <a href="http://www.xs4all.nl/~peterned/csshover.html#changes">xs4all.nl</a></p><div class="downloadinfo"><br /><a class="downloadlink dlimg" href="http://www.productivedreams.com/wp-content/plugins/download-monitor/download.php?id=css_hover.zip" title=" downloaded 551 times" ><img src="" alt="Download CSS hover " /></a><br /><a href="http://www.productivedreams.com/workshop/hover/" title="CSS hover" class="demo">Preview</a><br /></div>
<pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">body { </pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline">behavior: url(&quot;csshover3.htc&quot;); </pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">} </pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre><p>As I mentioned previously, don't forget to add the correct MIME type for htc behavior on your server. This is the key.</p>
<h1>7. Min-height &#038; Max-height</h1><div class="downloadinfo"><br /><a class="downloadlink dlimg" href="http://www.productivedreams.com/wp-content/plugins/download-monitor/download.php?id=min_max_height.zip" title=" downloaded 409 times" ><img src="" alt="Download Minimum and maximum height " /></a><br /><a href="http://www.productivedreams.com/workshop/min_max_height/" title="Minimum and Maximum Height" class="demo">Preview</a><br /></div>
<strong>Minimum height:</strong> <p>This is not really a hack since it uses valid css.</p>
<pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">.div_class_name{</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline">min-height: 140px;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">height: auto !important;</pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline">height: 140px;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">6</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines" width="1%">7</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre>
<strong>Maximum height:</strong><br /><pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">.div_class_name{</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline"> height: expression( this.scrollHeight &gt; 199 ? &quot;200px&quot; : &quot;auto&quot; );</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre>
<h1>8. Bicubic scaling for images</h1><p>One line code that solves the image scaling issue in IE6 and 7. Hats off to Chris Coyier for coming up with this <a href="http://css-tricks.com/ie-fix-bicubic-scaling-for-images/">solution</a>.</p>
<pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">img {</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline"> -ms-interpolation-mode: bicubic; </pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre>
<h1>9. Negative text indent for input buttons</h1><p>Negative text indent is normally used to hide the text value inside buttons, which lets you use custom background images for them. For some reason, IE doesn't support negative text indent for input buttons. For more details about this issue <a href="http://www.productivedreams.com/ie-not-intepreting-text-indent-on-submit-buttons/">check out this post</a></p><div class="downloadinfo"><br /><a class="downloadlink dlimg" href="http://www.productivedreams.com/wp-content/plugins/download-monitor/download.php?id=pd_textindent_ie.zip" title="Version 1.0 downloaded 964 times" ><img src="" alt="Download IE text-indent issue Version 1.0" /></a><br /><a href="http://productivedreams.com/workshop/negative_text_indent/" title="Negative text indent" class="demo">Preview</a><br /></div>
<pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">01</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">02</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">input.button {</pre></td></tr><tr><td class="devcodelines" width="1%">03</td><td class="devcodelinesarea"><pre class="devcode devcodeline">width:114px;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">04</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">height:37px;</pre></td></tr><tr><td class="devcodelines" width="1%">05</td><td class="devcodelinesarea"><pre class="devcode devcodeline">border: none;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">06</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">background: transparent url(images/button_image.gif) no-repeat center;</pre></td></tr><tr><td class="devcodelines" width="1%">07</td><td class="devcodelinesarea"><pre class="devcode devcodeline">overflow: hidden;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">08</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">text-indent: -999px;</pre></td></tr><tr><td class="devcodelines" width="1%">09</td><td class="devcodelinesarea"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">10</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre>
<h1>10. Text shadow</h1><p>The shadow filter is one of the useful filters for IE.</p><div class="downloadinfo"><br /><a class="downloadlink dlimg" href="http://www.productivedreams.com/wp-content/plugins/download-monitor/download.php?id=text_shadow.zip" title=" downloaded 460 times" ><img src="" alt="Download Text shadow for IE " /></a><br /><a href="http://www.productivedreams.com/workshop/text_shadow/" title="Text Shadow in IE" class="demo">Preview</a><br /></div>
<pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">.text_shadow{</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline">filter: Shadow(Color=#999999, Direction=135, Strength=5);</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">height: 1%;</pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">6</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre><div class="relposts"><h3>RELATED POSTS</h3><ul class="related_post"><li><a href="http://www.productivedreams.com/simple-css-based-usability-tip-for-search-buttons/" title="A simple CSS based usability tip for search buttons">A simple CSS based usability tip for search buttons</a></li><li><a href="http://www.productivedreams.com/ie-css-hack-without-using-any-hacks/" title="IE CSS hack without using any hacks!">IE CSS hack without using any hacks!</a></li><li><a href="http://www.productivedreams.com/min-width-issue-in-ie6/" title="Min-width issue in IE6">Min-width issue in IE6</a></li><li><a href="http://www.productivedreams.com/ie-not-intepreting-text-indent-on-submit-buttons/" title=" IE not interpreting text-indent on submit buttons ?"> IE not interpreting text-indent on submit buttons ?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.productivedreams.com/properties-that-were-impossible-to-implement-in-ie6/feed/</wfw:commentRss>
		<slash:comments>87</slash:comments>
		</item>
		<item>
		<title>IE CSS hack without using any hacks!</title>
		<link>http://www.productivedreams.com/ie-css-hack-without-using-any-hacks/</link>
		<comments>http://www.productivedreams.com/ie-css-hack-without-using-any-hacks/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 10:33:19 +0000</pubDate>
		<dc:creator>Gopal Raju</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Workshop]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Hacks]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.productivedreams.com/?p=201</guid>
		<description><![CDATA[A few days back while working for a MAJOR client (sorry, can&#8217;t mention their name), I discovered something new (I hope it&#8217;s new ) &#8211; A pure CSS based image replacement solution for IE.  This method is helpful especially to solve the PNG issue in IE6. I know there are many CSS hacks available [...]]]></description>
			<content:encoded><![CDATA[<p>A few days back while working for a MAJOR client (sorry, can&#8217;t mention their name), I discovered something new (I hope it&#8217;s new ) &#8211; A pure CSS based image replacement solution for IE.  This method is helpful especially to solve the PNG issue in IE6. I know there are many CSS hacks available out there to solve the PNG transparency issue, but this method doesn&#8217;t need any hacks!! Interesting isn&#8217;t it?</p>
<h1><strong>Step-1:</strong> Let&#8217;s review the HTML part first.</h1>
<pre class="devcodeblock" title="HTML"><table class="devcodetools"><tbody><tr><td>HTML</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">01</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">02</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">&lt;html&gt;</pre></td></tr><tr><td class="devcodelines" width="1%">03</td><td class="devcodelinesarea"><pre class="devcode devcodeline">&nbsp;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">04</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">&lt;head&gt;</pre></td></tr><tr><td class="devcodelines" width="1%">05</td><td class="devcodelinesarea"><pre class="devcode devcodeline">&lt;title&gt;ProductiveDreams&lt;/title&gt;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">06</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">&lt;link href=”style.css” rel=”stylesheet” type=”text/css”/&gt;</pre></td></tr><tr><td class="devcodelines" width="1%">07</td><td class="devcodelinesarea"><pre class="devcode devcodeline">&lt;/head&gt;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">08</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">&nbsp;</pre></td></tr><tr><td class="devcodelines" width="1%">09</td><td class="devcodelinesarea"><pre class="devcode devcodeline">&lt;body&gt;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">10</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">&lt;div class=”bg-image”&gt;&lt;/div&gt;</pre></td></tr><tr><td class="devcodelines" width="1%">11</td><td class="devcodelinesarea"><pre class="devcode devcodeline">&lt;/body&gt;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">12</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">&nbsp;</pre></td></tr><tr><td class="devcodelines" width="1%">13</td><td class="devcodelinesarea"><pre class="devcode devcodeline">&lt;/html&gt;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">14</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre>
The following are the images that I've used for this tutorial. The image without saturation is a .gif and the colored one is a .png. You may right click and save the image.<br /><br /><div id="attachment_206" class="wp-caption alignnone" style="width: 144px"><a href="http://www.productivedreams.com/wp-content/uploads/2008/10/pd1.png"><img class="size-medium wp-image-206" title="ProductiveDreams Logo" src="http://www.productivedreams.com/wp-content/uploads/2008/10/pd1.png" alt="PNG Image" width="134" height="134" /></a><p class="wp-caption-text">Colorful PNG Image</p></div><br /><br /><div id="attachment_209" class="wp-caption alignnone" style="width: 144px"><a href="http://www.productivedreams.com/wp-content/uploads/2008/10/pd.gif"><img class="size-medium wp-image-209" title="ProductiveDreams Logo" src="http://www.productivedreams.com/wp-content/uploads/2008/10/pd.gif" alt="Desaturated GIF Image" width="134" height="134" /></a><p class="wp-caption-text">Desaturated GIF Image</p></div><br /><h1><strong>Step-2:</strong> The stylesheet</h1>
I included the following code in the stylesheet<br /><pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">01</td><td class="devcodelinesarea"><pre class="devcode devcodeline">body{</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">02</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">background:#000;</pre></td></tr><tr><td class="devcodelines" width="1%">03</td><td class="devcodelinesarea"><pre class="devcode devcodeline">text-align:center;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">04</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines" width="1%">05</td><td class="devcodelinesarea"><pre class="devcode devcodeline">&nbsp;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">06</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">div.bg-image{</pre></td></tr><tr><td class="devcodelines" width="1%">07</td><td class="devcodelinesarea"><pre class="devcode devcodeline">background:transparent url(images/pd.png) no-repeat center !important;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">08</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">width:134px;</pre></td></tr><tr><td class="devcodelines" width="1%">09</td><td class="devcodelinesarea"><pre class="devcode devcodeline">height:134px;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">10</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">}</pre></td></tr></table></div></pre>
Let me walk you through the CSS. The first part simply applies a background color to the body and center aligns the div element. In the second part, I've specified the width and height of the div (134px) based on the image dimensions and have given the .png as the background image. Everything works fine?<br /><h1><strong>Step-3:</strong> Solution for IE</h1>
This the most interesting part that does the magic.<br /><br />I added another line of CSS code just below<br /><strong>background:transparent url(images/pd.png) no-repeat center !important</strong>;<br />and the following is the code<br /><strong>background-image:url(images/pd.gif);</strong><br /><br />Check out the result in IE! Awesome.... isn't it? In all other browsers except IE you will see the colorful png image.<br /><h1>Consolidating the entire thing</h1>
So. the final css would look like:<br /><pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">01</td><td class="devcodelinesarea"><pre class="devcode devcodeline">body{</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">02</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">background:#000;</pre></td></tr><tr><td class="devcodelines" width="1%">03</td><td class="devcodelinesarea"><pre class="devcode devcodeline">text-align:center;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">04</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines" width="1%">05</td><td class="devcodelinesarea"><pre class="devcode devcodeline">&nbsp;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">06</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">div.bg-image{</pre></td></tr><tr><td class="devcodelines" width="1%">07</td><td class="devcodelinesarea"><pre class="devcode devcodeline">background:transparent url(images/pd.png) no-repeat center !important;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">08</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">background-image:url(images/pd.gif);</pre></td></tr><tr><td class="devcodelines" width="1%">09</td><td class="devcodelinesarea"><pre class="devcode devcodeline">width:134px;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">10</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">height:134px;</pre></td></tr><tr><td class="devcodelines" width="1%">11</td><td class="devcodelinesarea"><pre class="devcode devcodeline">margin:0px auto;</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">12</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">}</pre></td></tr></table></div></pre>
<br />For your ease, I have attached the sample files as a zip. Feel free to download it <span> <img src='http://www.productivedreams.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span> and do let me know your feedbacks.<br /><br /><a class="downloadlink dlimg" href="http://www.productivedreams.com/wp-content/plugins/download-monitor/download.php?id=pd_css_solution.zip" title=" downloaded 1190 times" ><img src="" alt="Download CSS Solution for image replacement " /></a><div class="relposts"><h3>RELATED POSTS</h3><ul class="related_post"><li><a href="http://www.productivedreams.com/simple-css-based-usability-tip-for-search-buttons/" title="A simple CSS based usability tip for search buttons">A simple CSS based usability tip for search buttons</a></li><li><a href="http://www.productivedreams.com/properties-that-were-impossible-to-implement-in-ie6/" title="10 CSS properties that &#8216;were&#8217; impossible to implement in IE6">10 CSS properties that &#8216;were&#8217; impossible to implement in IE6</a></li><li><a href="http://www.productivedreams.com/min-width-issue-in-ie6/" title="Min-width issue in IE6">Min-width issue in IE6</a></li><li><a href="http://www.productivedreams.com/common-requirements-for-website-design-and-corresponding-jquery-solutions/" title="3 common requirements/issues and the corresponding Jquery solutions for your next web project">3 common requirements/issues and the corresponding Jquery solutions for your next web project</a></li><li><a href="http://www.productivedreams.com/making-gallery-submissions-easy-for-designers/" title="Making gallery submissions easy for designers">Making gallery submissions easy for designers</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.productivedreams.com/ie-css-hack-without-using-any-hacks/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Min-width issue in IE6</title>
		<link>http://www.productivedreams.com/min-width-issue-in-ie6/</link>
		<comments>http://www.productivedreams.com/min-width-issue-in-ie6/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 09:07:35 +0000</pubDate>
		<dc:creator>Gopal Raju</dc:creator>
				<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Workshop]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Hacks]]></category>

		<guid isPermaLink="false">http://www.productivedreams.com/?p=218</guid>
		<description><![CDATA[This is something for those who care for IE6 and not W3C Standards. Recently I worked on a project, for which the layout was liquid and one of the requirements was to use a minimum width of 1000px. Is that a problem? Not at all.The problem was to make it compatible on all major browsers, [...]]]></description>
			<content:encoded><![CDATA[This is something <strong>for those who care for IE6 and not W3C Standards.</strong> Recently I worked on a project, for which the layout was liquid and one of the requirements was to use a <strong>minimum width</strong> of 1000px. Is that a problem? Not at all.<br /><br />The problem was to make it compatible on all major browsers, including IE6 !!!!!. I wonder why people still use IE.<br /><br />As usual, I started searching for the solution on the right top of my Firefox window (yes, google!) and found a few websites which had discussions on the same topic. Most of them had lengthy posts and not the real solution. After going through a couple of sites, I concluded with the following solution. I hope this would help those who come across the same problem.<br /><pre class="devcodeblock" title="CSS"><table class="devcodetools"><tbody><tr><td>CSS</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline">.div_class_name{</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">width: expression(document.body.clientWidth &lt; 1002? &quot;1000px&quot; : &quot;auto&quot;);</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline">}</pre></td></tr></table></div></pre>
Just add the above line in your CSS. Replace 1000px with the min-width value and replace 1002 with a value slightly greater than the min-width. To define the max-width, just replace the "&lt;" with "&gt;".<br /><br /><h1>Known Issues:</h1><ul><li>Only works with JavaScript enabled browsers</li><li>Not W3C valid</li>
</ul>
<br />That's all! I don't want this post to be lengthy like the others I went through <span> <img src='http://www.productivedreams.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span><div class="relposts"><h3>RELATED POSTS</h3><ul class="related_post"><li><a href="http://www.productivedreams.com/simple-css-based-usability-tip-for-search-buttons/" title="A simple CSS based usability tip for search buttons">A simple CSS based usability tip for search buttons</a></li><li><a href="http://www.productivedreams.com/properties-that-were-impossible-to-implement-in-ie6/" title="10 CSS properties that &#8216;were&#8217; impossible to implement in IE6">10 CSS properties that &#8216;were&#8217; impossible to implement in IE6</a></li><li><a href="http://www.productivedreams.com/ie-css-hack-without-using-any-hacks/" title="IE CSS hack without using any hacks!">IE CSS hack without using any hacks!</a></li><li><a href="http://www.productivedreams.com/ie-not-intepreting-text-indent-on-submit-buttons/" title=" IE not interpreting text-indent on submit buttons ?"> IE not interpreting text-indent on submit buttons ?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.productivedreams.com/min-width-issue-in-ie6/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
