<?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>Advanced CSS Design Resources - last-child.com &#187; :focus</title>
	<atom:link href="http://www.last-child.com/category/css/focus/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.last-child.com</link>
	<description>CSS Toys for Professional Web Developers</description>
	<lastBuildDate>Mon, 19 Dec 2011 18:30:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>A quick CSS3 sibling test with the video tag</title>
		<link>http://www.last-child.com/css3-sibling-with-video-tag/</link>
		<comments>http://www.last-child.com/css3-sibling-with-video-tag/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 15:56:31 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[:absolute]]></category>
		<category><![CDATA[:block]]></category>
		<category><![CDATA[:focus]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[position]]></category>
		<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[Siblings]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=240</guid>
		<description><![CDATA[I am working on a little widget that uses the html5 video tag on one of my test sites: Fyvr.net. I wanted to display related information when the video is playing. The sibling selector makes this easy. Here&#8217;s the basic markup &#60;li> &#60;video>...&#60;/video> &#60;p>...&#60;/p> &#60;/li> I wanted the paragraph to appear when the video is [...]]]></description>
			<content:encoded><![CDATA[<p>I am working on a little widget that uses the html5 video tag on one of my test sites: <a href="http://fyvr.net">Fyvr.net</a>.<br />
I wanted to display related information when the video is playing.  The sibling selector makes this easy. </p>
<p>Here&#8217;s the basic markup</p>
<pre><code lang="HTML">
&lt;li>
&lt;video>...&lt;/video>
&lt;p>...&lt;/p>
&lt;/li>
</code>
</pre>
<p>I wanted the paragraph to appear when the video is selected. So here&#8217;s the simple CSS</p>
<pre><code lang="CSS">
section#videolist li {
	position:relative;
}
section#videolist li p {
	display:none;
	position:absolute;
	bottom:-100px;
	left:0;
}
section#videolist li video:focus+p {
	display:block;
}
</code></pre>
<p>The sibling selector (+) is telling the browser to display the paragraph as block when its video brother has focus. This is a rough test. There could be some accessibility issues and I&#8217;ll need to test this out. Obviously this will not work in Internet Explorer. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/css3-sibling-with-video-tag/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Get rid of the dotted lines on links with image replacement</title>
		<link>http://www.last-child.com/get-rid-of-the-dotted-lines-on-links-with-image-replacement/</link>
		<comments>http://www.last-child.com/get-rid-of-the-dotted-lines-on-links-with-image-replacement/#comments</comments>
		<pubDate>Tue, 18 Apr 2006 17:15:40 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[:focus]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[text-indent]]></category>

		<guid isPermaLink="false">http://www.last-child.com/get-rid-of-the-dotted-lines-on-links-with-image-replacement/</guid>
		<description><![CDATA[I don&#8217;t remember where I first found this tip (Hedger Wang?), but it&#8217;s a good one. If you are using image replacement, i.e. background images and negative text-indent, you may notice a dotted line appear when the link is clicked and waiting for the page to change (:focus). It&#8217;s outlining the text that happens to [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t remember where I first found this tip (Hedger Wang?), but it&#8217;s a good one. If you are using image replacement, i.e. background images and negative text-indent, you may notice a dotted line appear when the link is clicked and waiting for the page to change (:focus). It&#8217;s outlining the text that happens to be wayyyyy off screen. It&#8217;s easy as pie to fix this issue.</p>
<h4>CSS Fix</h4>
<p>This will fix the problem in Firefox. Just drop this into your global.css file.<br />
<code lang="CSS"><br />
a:focus { -moz-outline-style: none; }/*this avoids having image replacement sections display a dotted outline*/<br />
</code></p>
<h4>JavaScript Fix</h4>
<p>This will fix the issue in the other browsers.<br />
<code lang="Javascript"><br />
var theahrefs = document.getElementsByTagName('a');<br />
//fix dotted line thing when link is OnClicked<br />
for(var x=0;x!=theahrefs.length;x++){<br />
theahrefs[x].onfocus = function stopLinkFocus(){this.hideFocus=true;};<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/get-rid-of-the-dotted-lines-on-links-with-image-replacement/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

