<?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>stick&#039;s corner &#187; css</title>
	<atom:link href="http://stick.gk2.sk/blog/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://stick.gk2.sk</link>
	<description>Look at you, hacker. A pathetic creature of meat and bone. How can you challenge a perfect, immortal machine?</description>
	<lastBuildDate>Mon, 26 Jul 2010 16:31:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Image with rounded corners (using CSS3)</title>
		<link>http://stick.gk2.sk/blog/2009/03/image-with-rounded-corners-using-css3/</link>
		<comments>http://stick.gk2.sk/blog/2009/03/image-with-rounded-corners-using-css3/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 11:02:17 +0000</pubDate>
		<dc:creator>Pavol Rusnak</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[tips+tricks]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://stick.gk2.sk/blog/?p=204</guid>
		<description><![CDATA[W3C added nice new options for creating rounded corners [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">W3C added nice <a href="http://www.css3.info/preview/rounded-border/">new options for creating rounded corners</a> of elements to their <a href="http://www.w3.org/TR/css3-background/">CSS3 working draft</a>. Engines like <a href="https://developer.mozilla.org/en/Gecko">Gecko</a>, <a href="http://en.wikipedia.org/wiki/KHTML">KHTML</a> and <a href="http://webkit.org/">WebKit</a> already implemented these functions, but they use vendor prefixes in the keywords (<code>-moz-border-radius</code>, <code>-khtml-border-radius</code> and <code>-webkit-border-radius</code> respectively), because the feature is not yet fully standardized. That&#8217;s also the reason why Opera and Internet Explorer decided not to implement this extension for now.</p>
<p style="text-align: justify;">I was playing with the rounded corners and I like this feature a lot, but I also hit one problem (in all 3 engines). When you use the <code>border-radius</code> with an <code>img</code> element, the image is drawn above the border, so it isn&#8217;t rounded (left example). Fortunately, the effect could be easily achieved by rounded <code>div</code>, setting its dimensions exactly to the image size and using the image as the <code>div</code>&#8216;s background (right example).</p>
<table style="width: 100%;" border="0">
<tbody>
<tr style="text-align: center">
<td><img class="size-full wp-image-205 aligncenter" title="rounded1" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/03/rounded1.jpg" alt="rounded img" width="184" height="244" /></td>
<td><img class="size-full wp-image-205 aligncenter" title="rounded1" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/03/rounded2.jpg" alt="rounded div" width="184" height="244" /></td>
</tr>
<tr style="vertical-align: top">
<td>
<pre>&lt;img style="border: 2px solid black;
            border-radius: 30px;
            -moz-border-radius: 30px;
            -khtml-border-radius: 30px;
            -webkit-border-radius: 30px;"
            src="presov.jpg" /&gt;</pre>
</td>
<td>
<pre>&lt;div style="border: 2px solid black;
            border-radius: 30px;
            -moz-border-radius: 30px;
            -khtml-border-radius: 30px;
            -webkit-border-radius: 30px;
            width: 180px;
            height: 240px;
            background: url('presov.jpg');" /&gt;</pre>
</td>
</tr>
</tbody>
</table>
<p style="text-align: justify;"><strong>Update#1:</strong> I reported the issue to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=485501">Gecko</a>, <a href="https://bugs.kde.org/show_bug.cgi?id=188242">KHTML</a> and <a href="https://bugs.webkit.org/show_bug.cgi?id=24880">WebKit</a> bugzillas.</p>
<p style="text-align: justify;"><strong>Update#2:</strong> Dave Hyatt closed the WebKit bug with the comment: &#8220;This was fixed recently.&#8221; \o/</p>
]]></content:encoded>
			<wfw:commentRss>http://stick.gk2.sk/blog/2009/03/image-with-rounded-corners-using-css3/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
	</channel>
</rss>
