<?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>orangeSPLoTCH &#187; CSS</title>
	<atom:link href="http://orangesplotch.com/blog/categories/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://orangesplotch.com/blog</link>
	<description>Web developing in the middle of the night.</description>
	<lastBuildDate>Wed, 25 Aug 2010 11:45:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>CSS sliding doors and buttons don&#8217;t play nice</title>
		<link>http://orangesplotch.com/blog/css-sliding-doors-and-buttons-dont-play-nice/</link>
		<comments>http://orangesplotch.com/blog/css-sliding-doors-and-buttons-dont-play-nice/#comments</comments>
		<pubDate>Fri, 18 May 2007 21:29:01 +0000</pubDate>
		<dc:creator>mattc</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[sliding doors]]></category>

		<guid isPermaLink="false">http://orangesplotch.com/blog/css-sliding-doors-and-buttons-dont-play-nice/</guid>
		<description><![CDATA[There appears to be a bug in Firefox's button rendering. When you insert a block element in the button, it won't align with the button, even when you set all of the borders, margins and padding to zero. I'm still looking for a cross-browser fix.]]></description>
			<content:encoded><![CDATA[<p class="intro">
If any of you are looking to try using the CSS sliding doors technique on buttons, beware! There appears to be a bug in Firefox&#8217;s button rendering. When you insert a block element in the button, it won&#8217;t align with the button, even when you set all of the borders, margins and padding to zero.
</p>
<h3>It all seemed so perfect</h3>
<p>After reading <a href="http://particletree.com/features/rediscovering-the-button-element/">Rediscovering the button element</a> and then <a href="http://www.oscaralexander.com/tutorials/how-to-make-sexy-buttons-with-css.html">How to make sexy buttons with CSS</a>, I was all pumped to make some <strong>slick form buttons</strong> for this site. As you might have noticed, the buttons around here are pretty plain.</p>
<p>Things looked very promising. By using the button element instead of the input element, I could implement the sliding doors technique. My buttons would have rounded corners AND expand with the text inside them. It almost seemed too good to be true.</p>
<p>Apparently it was.</p>
<h3>Then it blew up in my face</h3>
<p><img src="http://orangesplotch.com/media/images/random/button-slidingdoors.png" alt="Button rendering in Firefox and Internet Explorer 7" class="align-left bordered" /></p>
<p>Using the standard sliding door technique yeilded this result. Looks good in IE 7, but the images don&#8217;t align in Firefox. I tried battling with it for two hours before I went into a fit of rage and just deleted the whole stylesheet one line at a time. <strong>Digital tantrums are very unsatisfying.</strong> Fortunately this all took place on my testing server, so no actual stylesheets were injured.</p>
<p>Apparently the problem with Firefox lies in setting the <code>span</code> to <code>display:block</code>. It causes Firefox to add a 1px border to the top. When I took that line away it rendered beautifully in Firefox, but in IE 7 the background only showed immidiately behind the text. The rest of the button was white.</p>
<p>To get the sliding door to render properly in Firefox and IE 7, you&#8217;ll have to do some CSS browser hackery. In IE 7 set the span to <code>display: block</code> and in Firefox set it to <code>display: inline</code>. I&#8217;m not willing to do separate stylesheets for different browsers right now, so that just won&#8217;t work for me. For now, I&#8217;m setting the buttons to a fixed width. Hopefully the content in my buttons never gets longer than the image.</p>
<p class="emph">Has anyone else found a cross-browser way to make this work?</p>
]]></content:encoded>
			<wfw:commentRss>http://orangesplotch.com/blog/css-sliding-doors-and-buttons-dont-play-nice/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
