<?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>The Cynic Gazette &#187; html</title>
	<atom:link href="http://www.cynicgazette.com/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cynicgazette.com</link>
	<description>Web Design, Skepticism, Photography and Social Comment</description>
	<lastBuildDate>Thu, 08 Oct 2009 18:31:36 +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>IE6 min-height CSS hack without JavaScript</title>
		<link>http://www.cynicgazette.com/2009/05/29/ie6-min-height-css-hack-without-javascript/</link>
		<comments>http://www.cynicgazette.com/2009/05/29/ie6-min-height-css-hack-without-javascript/#comments</comments>
		<pubDate>Fri, 29 May 2009 18:05:49 +0000</pubDate>
		<dc:creator>Joisey Mike</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.cynicgazette.com/?p=174</guid>
		<description><![CDATA[Internet Explorer 6. I don&#8217;t hate it. Yes I do.
Here&#8217;s the story of an interesting min-height hack I came upon working with an outside design firm today. Technically it&#8217;s an exploit, since it&#8217;s exploiting a bug in IE6&#8217;s box model, but since we all know what people think when they see &#8220;IE6&#8243; and &#8220;exploit&#8221; in the [...]]]></description>
			<content:encoded><![CDATA[<p>Internet Explorer 6. I don&#8217;t hate it. Yes I do.</p>
<p>Here&#8217;s the story of an interesting <strong>min-height</strong> hack I came upon working with an outside design firm today. Technically it&#8217;s an exploit, since it&#8217;s exploiting a bug in IE6&#8217;s box model, but since we all know what people think when they see &#8220;IE6&#8243; and &#8220;exploit&#8221; in the same sentence, lets just leave &#8216;er be at &#8220;hack.&#8221;</p>
<p>When you define the height on a block element, let&#8217;s say a DIV, it&#8217;s pretty simple:</p>
<pre>div { height: 500px }</pre>
<p>However, if that div&#8217;s content (assuming normal document flow) will run longer than 500px in height, and you haven&#8217;t told the DIV what to do with the overflow, the height you&#8217;ve defined will act as a minimum height&#8230; like the <strong>min-height</strong> you can&#8217;t use since this is IE6.</p>
<p>So there you go. Use <strong>min-height</strong> in your master CSS document, and use <strong>height</strong> in your IE6 specific CSS document. Its really that simple.</p>
<p>Tricky, idin&#8217;t it <img src='http://www.cynicgazette.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.cynicgazette.com/2009/05/29/ie6-min-height-css-hack-without-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy multi-line tooltips with Javascript</title>
		<link>http://www.cynicgazette.com/2009/05/06/easy-multi-line-tooltips-with-javascript/</link>
		<comments>http://www.cynicgazette.com/2009/05/06/easy-multi-line-tooltips-with-javascript/#comments</comments>
		<pubDate>Wed, 06 May 2009 16:01:59 +0000</pubDate>
		<dc:creator>Joisey Mike</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[non-intrusive]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.cynicgazette.com/?p=171</guid>
		<description><![CDATA[Tooltips are helpful in a semantic web world where the use of the &#8220;alt&#8221; attribute is restricted to those times an image won&#8217;t show because you&#8217;re  a jerk who fat fingered the image URL.
Lets get right to it since I&#8217;m busy as hell today.
The tooltip is a shorthanded way of referring to the title attribute of [...]]]></description>
			<content:encoded><![CDATA[<p>Tooltips are helpful in a semantic web world where the use of the &#8220;alt&#8221; attribute is restricted to those times an image won&#8217;t show because you&#8217;re  a jerk who fat fingered the image URL.</p>
<p>Lets get right to it since I&#8217;m busy as hell today.</p>
<p>The tooltip is a shorthanded way of referring to the <strong>title</strong> attribute of a link or image (most commonly) though it can be used on other HTML elements. Since we&#8217;re all SEO experts around here, we know the only way to fly is to make a link like this:</p>
<pre>&lt;a href="link-url.html" title="Descriptive and relevant keyword phrase"&gt;revevant text for destination&lt;/a&gt;</pre>
<p>But what of the cold, huddled masses who shout from the mountain tops &#8220;But Cynic, I want a two-line tooltip!&#8221; Well, sure. We can do that with Javascript.</p>
<ol>
<li>Parse out and replace text in static tooltip.</li>
<li>Write the tooltip with a function</li>
</ol>
<h2>Parse out and replace text in static tooltip</h2>
<p>Lets toss a bit of text in our title attribute to tell us where we want our line break. I&#8217;m going to pretend I&#8217;m on a forum and make a quicktag-looking [br]:</p>
<pre>&lt;a href="link-url.html" title="Descriptive and[br]relevant keyword phrase"&gt;hi mom&lt;/a&gt;</pre>
<p>Now we need to create that linefeed. Lets make a function, and pop it into the head tag (or linked .js file).</p>
<pre>function makeMyLinefeedReal(imageElement) {
  var titleAttribute;
  titleAttribute = imageElement.title;
  titleAttribute = titleAttribute.replace(/\[br\]/, String.fromCharCode(10));
  imageElement.title = titleAttribute;
}</pre>
<p><span>And finally call it from the element.</span></p>
<p><span style="font-family: 'Courier New'; line-height: 18px; white-space: pre;">&lt;a href=&#8221;link-url.html&#8221; title=&#8221;Descriptive and[br]relevant keyword phrase&#8221; onmouseover=&#8221;makeMyLinefeedReal(this)&gt;hi mom&lt;/a&gt;</span></p>
<p>Done and done. If you want to get really fancypantsed, you can call this from the BODY&#8217;s onload, or document.ready if you&#8217;re awesomesauce enough to use jQuery.</p>
<h2>Write the tooltip with a function</h2>
<p>Keep in mind a web crawler isn&#8217;t goin go to see something created with javascript, so sure this next method sparingly&#8211;we&#8217;re going to write the whole title attribute with Javascript. You get to feel good about having neater HTML, and you can toss &#8220;non-intrusive clientside DOM scripting&#8221; on your resume.</p>
<p>I&#8217;m currently using this for tooltips on a page of pie charts right now for a full-time-jobby-job project which won&#8217;t be indexed, and even if it was available to the public, I&#8217;m not worried about SEO for the statictical breakdowns on the pie charts; just of the page containing the statistics. (Btw&#8211;coming soon: Kickass tutorial on making webtastic pie charts using Adobe Photoshop and Illustrator)</p>
<p>So here&#8217;s our tag, with a normal attribute.</p>
<pre>&lt;img src="link-url.png" id="favoritePies" height="100" width="100" alt="Pie chart of my favorite pies" /&gt;</pre>
<p>Our function can now take advantage of an escaped new line, <strong>\n</strong>, instead of having to mess with <strong>String.fromCharCode(10)</strong>.</p>
<pre><span style="font-family: Georgia; line-height: 19px; white-space: normal; ">f</span>unction makeMyLinefeed(imageElement) {</pre>
<pre>  imageElement.title = "This is my title\nAnd this is line 2!";</pre>
<pre>}</pre>
<p>And&#8230;</p>
<pre>&lt;img src="link-url.png" id="favoritePies" height="100" width="100" alt="Pie chart of my favorite pies" onmouseover="makeMyLinefeed(this)"/&gt;</pre>
<p>Easy, right? I&#8217;ll let you get trickier than a straigh line of text on your own. One more version for you: here&#8217;s the non-intrusive javascript version. Start with your tag:</p>
<pre>&lt;img src="link-url.png" id="favoritePies" height="100" width="100" alt="Pie chart of my favorite pies" /&gt;</pre>
<p>And this next line does all the fun stuff without any <strong>onmouseover</strong> attribute:</p>
<pre>document.getElementById("favoritePies").mouseover = function () { this.title = "This is my title\nAnd this is line 2!"; }</pre>
<p>So there we go, you have a few different ways to toss a line break into a title attribute. Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cynicgazette.com/2009/05/06/easy-multi-line-tooltips-with-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
