<?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>K-U-H-N.net - Software Development &#38; Tech Talk &#187; css</title>
	<atom:link href="http://k-u-h-n.net/wp/index.php/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://k-u-h-n.net/wp</link>
	<description></description>
	<lastBuildDate>Thu, 16 Jul 2009 08:50:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Text At The Bottom Of A Div &#8211; Without Positioning</title>
		<link>http://k-u-h-n.net/wp/index.php/2009/07/14/text-at-the-bottom-of-a-div-without-positioning/</link>
		<comments>http://k-u-h-n.net/wp/index.php/2009/07/14/text-at-the-bottom-of-a-div-without-positioning/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 11:51:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[demos]]></category>

		<guid isPermaLink="false">http://k-u-h-n.net/wp/?p=50</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div id="articleID-023">

	<p>
		Recently, I had to find a way to place a line of text at the bottom
		of a block element without using any positioning whatsoever.
		(<em>Overflow: hidden</em> on a container made everything with
		<em>position: absolute</em> or <em>relative</em> sticky when scrolling).
	</p>

	<p>
		Well here it is... works cross-browser including IE5.5. Untested
		in IE5 and IE/Mac, so I'd appreciate feedback on that.
	</p>

	<p>
		The general concept relies on pushing a <em>middle</em> wrapper box
		(invisible) down under an <em>outer</em> container box (orange).
		An <em>inner</em> box (yellow) containing the text is then brought
		up using a negative margin of (roughly) the font-size.
		Font-size can be specified using relative values (i.e. em),
		so this should be fully scalable. It is also possible to add
		space at the bottom of the text, which might actually be a
		good idea as IE7 tends to cut off a tiny slice of below-baseline characters.
		For details please view the source.
	</p>

	<p>
		Unlike my example below, you may want to choose a width large enough
		to hold the text, if the user increases the font-size.
	</p>

	<p>
		It's not exactly pixel perfect (as line-heights vary
		across browsers) but it might work when nothing else does...
	</p>

	<p>
		Feedback as always appreciated.
	</p>


	<div class="outer">
		<div class="middle">
			<div class="inner">
				Lore'm ipsujum
			</div>
		</div>
	</div>


</div>]]></content:encoded>
			<wfw:commentRss>http://k-u-h-n.net/wp/index.php/2009/07/14/text-at-the-bottom-of-a-div-without-positioning/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>KUHN Pure CSS Lightbox &#8211; Without Javascript</title>
		<link>http://k-u-h-n.net/wp/index.php/2009/07/08/kuhn-pure-css-lightbox/</link>
		<comments>http://k-u-h-n.net/wp/index.php/2009/07/08/kuhn-pure-css-lightbox/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 10:18:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[demos]]></category>

		<guid isPermaLink="false">http://www.cb-automobile.net/wordpress/?p=26</guid>
		<description><![CDATA[A CSS-only Lightbox:
]]></description>
			<content:encoded><![CDATA[
<div id="articleID-025">
	 <a href="http://k-u-h-n.net/wp/index.php/2009/07/08/kuhn-pure-css-lightbox/" class="more-link">(more&#8230;)</a></div>]]></content:encoded>
			<wfw:commentRss>http://k-u-h-n.net/wp/index.php/2009/07/08/kuhn-pure-css-lightbox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IE Ignored Line-height Bug</title>
		<link>http://k-u-h-n.net/wp/index.php/2009/06/16/ie-ignored-line-height-bug/</link>
		<comments>http://k-u-h-n.net/wp/index.php/2009/06/16/ie-ignored-line-height-bug/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 18:45:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[bugs]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://k-u-h-n.net/wp/?p=68</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[	<div id="articleID-006">
		<h3>Introduction</h3>
		<p>
			This is a bug that causes IE to ignore line-height settings on a block
			element containing an inline element with
			<a href="http://www.satzansatz.de/cssd/onhavinglayout.html">layout</a>.
		</p>

		<h4>Affected Browsers</h4>
		<p>
			The bug affects IE6 and IE5.5 for all and IE7 for sub-normal line-heights.
			The bug has been fixed in IE8.
		</p>

		 <a href="http://k-u-h-n.net/wp/index.php/2009/06/16/ie-ignored-line-height-bug/" class="more-link">(more&#8230;)</a></div>]]></content:encoded>
			<wfw:commentRss>http://k-u-h-n.net/wp/index.php/2009/06/16/ie-ignored-line-height-bug/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>IE/Opera Shrink-Wrap With Line Break Bug</title>
		<link>http://k-u-h-n.net/wp/index.php/2009/06/05/ie-opera-shrink-wrap-with-line-break-bug/</link>
		<comments>http://k-u-h-n.net/wp/index.php/2009/06/05/ie-opera-shrink-wrap-with-line-break-bug/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 21:12:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[bugs]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.cb-automobile.net/wordpress/?p=31</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div id="articleID-022">

	<p>
		Trying to find a way to implement max-width behaviour in IE6-, I stumbled upon an
		Opera/IE7- bug concerning their shrink-wrap behaviour. Firefox 3, Safari 4 and Chrome 2
		do not show this bug and it has also been fixed in IE8. The bug shows in Opera 9.64, feedback
		on earlier versions would be appreciated.
	</p>

	<p>
		If we put a shrink-wrapped <em>inner</em> box (dark gray) with some content inside an
		<em>outer</em> box (light gray)
		with an explicit width set, the <em>inner</em> box will grow with its content until it
		reaches the content-edge of the <em>outer</em> box. At that point line-breaking or overflow is
		induced in the <em>inner</em> box. So far so good, but after a linebreak IE7- and Opera shrink
		the box to fit the text's width while all other aforementioned browsers dont't (See
		<span class="reference">Figs. 1-3</span>).
	</p>


	<div class="exampleBox">
		<h6>Live demo</h6>
		<div class="container">
			<div class="outer">
				<div class="inner">Lorem ipsum dolor sit amet, consetetur</div>
			</div>
		</div>
		<div class="caption">Fig. 1</div>
	</div>

	<div class="exampleBox">
		<h6>FF screenshot</h6>
		<div class="container">
			<img class="screenshot" src="http://k-u-h-n.net/wp/wp-content/articles/css/bugs/IE-Opera-shrink-wrap-with-line-break-bug/img/ff_screenshot.gif" alt="FF screenshot"/>
		</div>
		<div class="caption">Fig. 2</div>
	</div>

	<div class="exampleBox">
		<h6>Opera screenshot</h6>
		<div class="container">
			<img class="screenshot" src="http://k-u-h-n.net/wp/wp-content/articles/css/bugs/IE-Opera-shrink-wrap-with-line-break-bug/img/Opera_screenshot.gif" alt="Opera screenshot"/>
		</div>
		<div class="caption">Fig. 3</div>
	</div>



	<p class="clear">
		Well, that can't be right... Let's have a look at the
		<a href="http://www.w3.org/TR/CSS21/visudet.html#float-width">specs</a>:
	</p>

	<blockquote>
		<p>
			Calculation of the shrink-to-fit width is similar to calculating the width of a
			table cell using the automatic table layout algorithm. Roughly: calculate the preferred
			width by formatting the content without breaking lines other than where explicit
			line breaks occur, and also calculate the preferred minimum width, e.g., by trying
			all possible line breaks. CSS 2.1 does not define the exact algorithm. Thirdly,
			find the available width: in this case, this is the width of the containing block
			minus the used values of 'margin-left', 'border-left-width', 'padding-left',
			'padding-right', 'border-right-width', 'margin-right', and the widths of any
			relevant scroll bars.
		</p>
		<p>
			Then the shrink-to-fit width is: min(max(preferred minimum width, available width),
			preferred width).
		</p>
	</blockquote>



	<p>
		Ok, what does that mean for our little example?
	</p>

	<ol>
		<li>
			The preferred width is a lot longer than the <em>outer</em> box's width, as the text
			does not fit inside the box without a linebreak.
		</li>
		<li>
			The available width is the width of the <em>outer</em> box.
		</li>
		<li>
			The preferred minimum width, although not further specified, is definitely
			smaller than the <em>outer</em> box's width, as there is no word longer than
			the <em>outer</em> box's width.
		</li>
		<li>
			The maximum of the preferred minimum width and the available width,
			is the available width (2 + 3).
		</li>
		<li>
			The minimum of the available width and the preferred minimum width is
			the available width (1 + 2).
		</li>
	</ol>

	<p>
		Therefore (4 + 5), the shrink-to-fit width is the available width.
	</p>

	<p>
		In conclusion, though at first glance it may not seem so, IE7- and Opera are wrong.
	</p>

	<p>
		As always, feedback is appreciated.
	</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://k-u-h-n.net/wp/index.php/2009/06/05/ie-opera-shrink-wrap-with-line-break-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE Block Elements in List-items Bug</title>
		<link>http://k-u-h-n.net/wp/index.php/2009/05/18/ie-block-elements-in-list-items-bug/</link>
		<comments>http://k-u-h-n.net/wp/index.php/2009/05/18/ie-block-elements-in-list-items-bug/#comments</comments>
		<pubDate>Mon, 18 May 2009 20:33:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[bugs]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://k-u-h-n.net/wp/?p=66</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div id="articleID-009">
		<h3>Introduction</h3>
		<p>
			Let's talk about lists... While there are
			<a href="http://gtwebdev.com/workshop/gaps/white-space-bug.php">many</a>
			<a href="http://www.positioniseverything.net/explorer/ie-listbug.html">well</a>
			<a href="http://gregor-moellring.de/anleitungen/ie-bug-css-kurzform-von-liste-style/">documented</a>
			<a href="http://www.richinstyle.com/bugs/ie5b.html#list">bugs</a>
			concerning lists in IE, there is one that I couldn't find much about.
			Basically, in list-items, IE treats block elements with
			<a href="http://www.satzansatz.de/cssd/onhavinglayout.html">layout</a>
			like <em>inline-block</em> and in some respect like <em>inline</em>
			elements, which can	cause various positioning and white space
			problems.
		</p>

		<h4>Affected Browsers</h4>
		<p>
			The bug affects IE7- and has been fixed in IE8.
		</p>

		 <a href="http://k-u-h-n.net/wp/index.php/2009/05/18/ie-block-elements-in-list-items-bug/" class="more-link">(more&#8230;)</a></div>]]></content:encoded>
			<wfw:commentRss>http://k-u-h-n.net/wp/index.php/2009/05/18/ie-block-elements-in-list-items-bug/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IE Collapsing Block Box Bug</title>
		<link>http://k-u-h-n.net/wp/index.php/2008/11/07/ie-collapsing-block-box-bug/</link>
		<comments>http://k-u-h-n.net/wp/index.php/2008/11/07/ie-collapsing-block-box-bug/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 19:17:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[bugs]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.cb-automobile.net/wordpress/?p=15</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[	<div id="articleID-013">
		<h3>Introduction</h3>
		<p>
			Let's have a look at IE's Collapsing Block Box bug... yes, say that 3 times fast.
			This bug causes IE to collapse a block box containing an inline element to the inline
			element's height in disregard of the block boxes line-height. This behaviour is a
			violation of the <a href="http://www.w3.org/TR/CSS21/visudet.html#leading">CSS specs</a> as
		</p>

		<blockquote>
			<p>
				in a "block-level [...] element whose content is composed
				of inline-level elements, 'line-height' specifies the minimal height of line boxes within
				the element. The minimum height consists of a minimum height above the block's baseline
				and a minimum depth below it, exactly as if each line box starts with a zero-width inline
				box with the block's font and line height properties.
			</p>
		</blockquote>

		<h4>Affected Browsers</h4>
		<p>
			In IE 5.5 this bug affects <strong>all</strong> block elements, in IE6/7 all <strong>non-list</strong> block elements.
			The bug has been fixed in IE8. Note that standard browsers behave the same way with
			(x)html transitional doctypes, with the fix below havin no effect.
		</p>

		 <a href="http://k-u-h-n.net/wp/index.php/2008/11/07/ie-collapsing-block-box-bug/" class="more-link">(more&#8230;)</a></div>]]></content:encoded>
			<wfw:commentRss>http://k-u-h-n.net/wp/index.php/2008/11/07/ie-collapsing-block-box-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
