<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: CSS min-height Explained</title>
	<atom:link href="http://www.search-this.com/2007/02/05/css-min-height-explained/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.search-this.com/2007/02/05/css-min-height-explained/</link>
	<description>Internet Marketing, Website Promotion and Blogging Advice</description>
	<lastBuildDate>Thu, 11 Mar 2010 15:25:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Paul</title>
		<link>http://www.search-this.com/2007/02/05/css-min-height-explained/comment-page-1/#comment-159596</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Mon, 01 Feb 2010 11:05:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/02/05/css-min-height-explained/#comment-159596</guid>
		<description>Many thanks Paul - I&#039;ll have a play with those.

Thanks for taking the time,
Paul.</description>
		<content:encoded><![CDATA[<p>Many thanks Paul &#8211; I&#8217;ll have a play with those.</p>
<p>Thanks for taking the time,<br />
Paul.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul OB</title>
		<link>http://www.search-this.com/2007/02/05/css-min-height-explained/comment-page-1/#comment-159588</link>
		<dc:creator>Paul OB</dc:creator>
		<pubDate>Mon, 01 Feb 2010 09:05:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/02/05/css-min-height-explained/#comment-159588</guid>
		<description>Hi,

@Paul: This is unlikely to be what you want as it will probably result in scrollbars on the window and on the element.

html, body {
	height:100%;
	margin:0;
	padding:0
}
body {
	background-image:url(‘txblueblank.jpg’);
}
#container {
	width:800px;
	height:100%;
	min-height:800px;
	margin:auto;
	background-color:red;
	overflow:auto;
}
(won&#039;t work in ie6)

The problem is that 800px min-height will be higher than the viewport in most cases and a scrollbar on the viewport will be needed.

If you just want the scrollbar on the element then just use height:100% and no min-height and use overflow:auto to create the scrollbar on the element.

If you want to vertically center an element of fixed height then check through the css articles on here as that has been covered.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>@Paul: This is unlikely to be what you want as it will probably result in scrollbars on the window and on the element.</p>
<p>html, body {<br />
	height:100%;<br />
	margin:0;<br />
	padding:0<br />
}<br />
body {<br />
	background-image:url(‘txblueblank.jpg’);<br />
}<br />
#container {<br />
	width:800px;<br />
	height:100%;<br />
	min-height:800px;<br />
	margin:auto;<br />
	background-color:red;<br />
	overflow:auto;<br />
}<br />
(won&#8217;t work in ie6)</p>
<p>The problem is that 800px min-height will be higher than the viewport in most cases and a scrollbar on the viewport will be needed.</p>
<p>If you just want the scrollbar on the element then just use height:100% and no min-height and use overflow:auto to create the scrollbar on the element.</p>
<p>If you want to vertically center an element of fixed height then check through the css articles on here as that has been covered.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.search-this.com/2007/02/05/css-min-height-explained/comment-page-1/#comment-159497</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Sun, 31 Jan 2010 00:41:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/02/05/css-min-height-explained/#comment-159497</guid>
		<description>Hi Paul,

I&#039;m trying to get a page of a fixed width floating centrally horizontally, which is the full height of the window, but which shows a vertical scrollbar if the browser height is reduced below a certain value - say 800px.

I think that the code you are discussing here should do that but I&#039;m not sure. I&#039;ve tried incorporating the code at the top but the scrollbar never appears.
the css I&#039;ve got so far is:

html,body
{
height:100%;
}

body
{
padding:0px;
background-image:url(&#039;txblueblank.jpg&#039;);
}


#container
{
width:800px;
height:100%;
min-height:800px;

margin-left:auto;
margin-right:auto;
position: absolute;
top: 0px;
	
left: 50%;
margin-left:-400px;

background-color:white;
}


html&gt;body #container	/* not ie6- */ 
{
height:auto;min-height:800px;
}


Using IE7 - Can I do what I&#039;m trying to do, and if so what am I doing wrong please?

Many thanks,
paul.</description>
		<content:encoded><![CDATA[<p>Hi Paul,</p>
<p>I&#8217;m trying to get a page of a fixed width floating centrally horizontally, which is the full height of the window, but which shows a vertical scrollbar if the browser height is reduced below a certain value &#8211; say 800px.</p>
<p>I think that the code you are discussing here should do that but I&#8217;m not sure. I&#8217;ve tried incorporating the code at the top but the scrollbar never appears.<br />
the css I&#8217;ve got so far is:</p>
<p>html,body<br />
{<br />
height:100%;<br />
}</p>
<p>body<br />
{<br />
padding:0px;<br />
background-image:url(&#8216;txblueblank.jpg&#8217;);<br />
}</p>
<p>#container<br />
{<br />
width:800px;<br />
height:100%;<br />
min-height:800px;</p>
<p>margin-left:auto;<br />
margin-right:auto;<br />
position: absolute;<br />
top: 0px;</p>
<p>left: 50%;<br />
margin-left:-400px;</p>
<p>background-color:white;<br />
}</p>
<p>html&gt;body #container	/* not ie6- */<br />
{<br />
height:auto;min-height:800px;<br />
}</p>
<p>Using IE7 &#8211; Can I do what I&#8217;m trying to do, and if so what am I doing wrong please?</p>
<p>Many thanks,<br />
paul.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul OB</title>
		<link>http://www.search-this.com/2007/02/05/css-min-height-explained/comment-page-1/#comment-159419</link>
		<dc:creator>Paul OB</dc:creator>
		<pubDate>Sat, 30 Jan 2010 00:39:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/02/05/css-min-height-explained/#comment-159419</guid>
		<description>@last poster see my last post :)</description>
		<content:encoded><![CDATA[<p>@last poster see my last post <img src='http://www.search-this.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: min-height in ie6 - Website Babble Webmaster Forums</title>
		<link>http://www.search-this.com/2007/02/05/css-min-height-explained/comment-page-1/#comment-159402</link>
		<dc:creator>min-height in ie6 - Website Babble Webmaster Forums</dc:creator>
		<pubDate>Fri, 29 Jan 2010 17:12:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/02/05/css-min-height-explained/#comment-159402</guid>
		<description>[...] googled this, there are worse, better and just different ways to do this. I&#039;d probably go with Dustin Diaz&#039;s or Stu Nicholls&#039; solutions.     [...]</description>
		<content:encoded><![CDATA[<p>[...] googled this, there are worse, better and just different ways to do this. I&#39;d probably go with Dustin Diaz&#39;s or Stu Nicholls&#39; solutions.     [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul OB</title>
		<link>http://www.search-this.com/2007/02/05/css-min-height-explained/comment-page-1/#comment-158974</link>
		<dc:creator>Paul OB</dc:creator>
		<pubDate>Thu, 21 Jan 2010 17:02:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/02/05/css-min-height-explained/#comment-158974</guid>
		<description>@disha: The !important hack is rather an ugly hack because it makes other browsers work rather than targeting the browser with the problem.

It is also not fullproof in IE7 in some very odd cases (especially with min-height:100%) and therefore I recommend the following which is less characters and doesn&#039;t suffer from any issues in IE7 at all.

#outer {min-height:500px;}
* html #outer {height:500px}</description>
		<content:encoded><![CDATA[<p>@disha: The !important hack is rather an ugly hack because it makes other browsers work rather than targeting the browser with the problem.</p>
<p>It is also not fullproof in IE7 in some very odd cases (especially with min-height:100%) and therefore I recommend the following which is less characters and doesn&#8217;t suffer from any issues in IE7 at all.</p>
<p>#outer {min-height:500px;}<br />
* html #outer {height:500px}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: disha</title>
		<link>http://www.search-this.com/2007/02/05/css-min-height-explained/comment-page-1/#comment-158966</link>
		<dc:creator>disha</dc:creator>
		<pubDate>Thu, 21 Jan 2010 10:48:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/02/05/css-min-height-explained/#comment-158966</guid>
		<description>I used

#outer {
  min-height:500px;
  height:auto !important;
  height:500px;
}
it worked for me</description>
		<content:encoded><![CDATA[<p>I used</p>
<p>#outer {<br />
  min-height:500px;<br />
  height:auto !important;<br />
  height:500px;<br />
}<br />
it worked for me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anitha</title>
		<link>http://www.search-this.com/2007/02/05/css-min-height-explained/comment-page-1/#comment-157611</link>
		<dc:creator>Anitha</dc:creator>
		<pubDate>Wed, 30 Dec 2009 00:49:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/02/05/css-min-height-explained/#comment-157611</guid>
		<description>Thanks a ton Paul!</description>
		<content:encoded><![CDATA[<p>Thanks a ton Paul!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Webmaster</title>
		<link>http://www.search-this.com/2007/02/05/css-min-height-explained/comment-page-1/#comment-149198</link>
		<dc:creator>The Webmaster</dc:creator>
		<pubDate>Thu, 06 Aug 2009 17:03:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/02/05/css-min-height-explained/#comment-149198</guid>
		<description>this is awesome. it works perfectly. I was really happy to find this</description>
		<content:encoded><![CDATA[<p>this is awesome. it works perfectly. I was really happy to find this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vee</title>
		<link>http://www.search-this.com/2007/02/05/css-min-height-explained/comment-page-1/#comment-146694</link>
		<dc:creator>Vee</dc:creator>
		<pubDate>Tue, 23 Jun 2009 11:00:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/02/05/css-min-height-explained/#comment-146694</guid>
		<description>Worked like a charm, thanks!</description>
		<content:encoded><![CDATA[<p>Worked like a charm, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul OB</title>
		<link>http://www.search-this.com/2007/02/05/css-min-height-explained/comment-page-1/#comment-145547</link>
		<dc:creator>Paul OB</dc:creator>
		<pubDate>Thu, 11 Jun 2009 16:34:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/02/05/css-min-height-explained/#comment-145547</guid>
		<description>@nawaraj - No that is the worst method as far as I am concerned.:)

Not only does it exhibit the same IE7 bug I mention at the end of the article it mis-uses !important and has actually caused people not to understand the way that the  !important rule works. Consequently most people don&#039;t think it works in IE6 when it works very well.

It&#039;s only a hack because IE doesn&#039;t understand 2 rules the same in a block and only actions the last one it sees. In normal use !important works fine.

Using !important as a hack is ugly and unnecessary and I advise against using it. Not only does it mix hacks in with the clean code it makes it harder to debug later on if styles are modified further along.

Always remove your hacks from the clean code and only apply them to the browser that has the problem. Why make all browsers read 2 rules when it&#039;s only IE6 that has the problem?

As an aside my method actually uses less code than yours.

e.g.
.test{min-height:500px}
* html .test{height:500px}

Therefore avoid the !important hack like the plague.:)</description>
		<content:encoded><![CDATA[<p>@nawaraj &#8211; No that is the worst method as far as I am concerned.:)</p>
<p>Not only does it exhibit the same IE7 bug I mention at the end of the article it mis-uses !important and has actually caused people not to understand the way that the  !important rule works. Consequently most people don&#8217;t think it works in IE6 when it works very well.</p>
<p>It&#8217;s only a hack because IE doesn&#8217;t understand 2 rules the same in a block and only actions the last one it sees. In normal use !important works fine.</p>
<p>Using !important as a hack is ugly and unnecessary and I advise against using it. Not only does it mix hacks in with the clean code it makes it harder to debug later on if styles are modified further along.</p>
<p>Always remove your hacks from the clean code and only apply them to the browser that has the problem. Why make all browsers read 2 rules when it&#8217;s only IE6 that has the problem?</p>
<p>As an aside my method actually uses less code than yours.</p>
<p>e.g.<br />
.test{min-height:500px}<br />
* html .test{height:500px}</p>
<p>Therefore avoid the !important hack like the plague.:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nawaraj</title>
		<link>http://www.search-this.com/2007/02/05/css-min-height-explained/comment-page-1/#comment-145500</link>
		<dc:creator>nawaraj</dc:creator>
		<pubDate>Thu, 11 Jun 2009 09:26:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/02/05/css-min-height-explained/#comment-145500</guid>
		<description>the best method is this...

min-height: 140px;
height: auto !important;
height: 140px;</description>
		<content:encoded><![CDATA[<p>the best method is this&#8230;</p>
<p>min-height: 140px;<br />
height: auto !important;<br />
height: 140px;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabe</title>
		<link>http://www.search-this.com/2007/02/05/css-min-height-explained/comment-page-1/#comment-128595</link>
		<dc:creator>Gabe</dc:creator>
		<pubDate>Thu, 19 Feb 2009 04:16:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/02/05/css-min-height-explained/#comment-128595</guid>
		<description>Thank you so much.  U rock. &#039;nuff said.</description>
		<content:encoded><![CDATA[<p>Thank you so much.  U rock. &#8217;nuff said.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vanshi</title>
		<link>http://www.search-this.com/2007/02/05/css-min-height-explained/comment-page-1/#comment-122408</link>
		<dc:creator>Vanshi</dc:creator>
		<pubDate>Wed, 07 Jan 2009 14:59:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/02/05/css-min-height-explained/#comment-122408</guid>
		<description>very helpful article. Solved my min-height issues in IE6 and IE7. Thanks</description>
		<content:encoded><![CDATA[<p>very helpful article. Solved my min-height issues in IE6 and IE7. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MrGamma</title>
		<link>http://www.search-this.com/2007/02/05/css-min-height-explained/comment-page-1/#comment-115363</link>
		<dc:creator>MrGamma</dc:creator>
		<pubDate>Mon, 24 Nov 2008 16:04:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/02/05/css-min-height-explained/#comment-115363</guid>
		<description>A total life saver... I have just been through hell with a much more complicated hack solution which relied on JavaScripts and conditionals...

Even though I tested it in every browser, reports still came in from the odd user who said differently. Complicated hacks aren;t worth it. This is simple. Much more elegant. Thank you.</description>
		<content:encoded><![CDATA[<p>A total life saver&#8230; I have just been through hell with a much more complicated hack solution which relied on JavaScripts and conditionals&#8230;</p>
<p>Even though I tested it in every browser, reports still came in from the odd user who said differently. Complicated hacks aren;t worth it. This is simple. Much more elegant. Thank you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 1.383 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-12 13:15:46 -->
