<?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>withoutnations - Mark Mitchell &#187; CSS</title>
	<atom:link href="http://www.withoutnations.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.withoutnations.com</link>
	<description>Chasing a passion for good design, trying hard not to lose the plot.</description>
	<lastBuildDate>Sat, 08 May 2010 21:14:21 +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>Styling Input and Anchor tags as action buttons with cross-platform support</title>
		<link>http://www.withoutnations.com/2009/11/29/styling-input-and-anchor-tags-as-action-buttons-with-cross-platform-support/</link>
		<comments>http://www.withoutnations.com/2009/11/29/styling-input-and-anchor-tags-as-action-buttons-with-cross-platform-support/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 16:30:38 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ink]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Input Elements]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.withoutnations.com/?p=405</guid>
		<description><![CDATA[Attempting to style inline objects consistently across multiple browsers and platforms is difficult enough with unpredictable standards support &#8212; trying to maintain that exact style across form input elements as well has been near fantasy until recently. Thankfully, with the combined knowledge of the web development community and rapid adoption of reworked web standards by [...]]]></description>
			<content:encoded><![CDATA[<p>Attempting to style inline objects consistently across multiple browsers and platforms is difficult enough with unpredictable standards support &#8212; trying to maintain that exact style across form input elements as well has been near fantasy until recently. Thankfully, with the combined knowledge of the web development community and rapid adoption of reworked web standards by modern browsers, solutions are available.</p>
<p>For a recent project I had the task of applying one consistent button style to form inputs, anchor tags, and a handful of paragraph tags &#8212; with varying widths and background colors. Taking a cue from the brilliant work already posted on the <a title="Filament Group" href="http://www.filamentgroup.com/lab/update_styling_the_button_element_with_css_sliding_doors_now_with_image_spr/">Filament Group</a> (which is derivative of the <a href="http://www.alistapart.com/articles/slidingdoors/">ALA sliding doors method</a> and the work of <a href="http://particletree.com/features/rediscovering-the-button-element/">Kevin Hale at Particletree</a>), I developed a class that is applicable across a variety of elements. The examples given were generally applied to the button element; my project called for standard inputs with type &#8216;submit&#8217;. The class scope is left open to allow for easier application to non-form elements. A few instances:</p>
<pre><code>&lt;a href="#" class="input-btn-link"&gt;&lt;span&gt;Add to Favorites&lt;/span&gt;&lt;/a&gt;
&lt;a href="#" class="input-btn-link small"&gt;&lt;span&gt;Add to Favorites&lt;/span&gt;&lt;/a&gt;
&lt;input class="input-btn" type="submit" value="Add to Favorites" /&gt;
&lt;input class="input-btn small" type="submit" value="Add to Favorites" /&gt;
&lt;input class="input-btn medium" type="submit" value="Add to Favorites" /&gt;
&lt;input class="input-btn large" type="submit" value="Add to Favorites" /&gt;
&lt;p class="input-btn"&gt;Add to Favorites/p&gt;</code></pre>
<p><span id="more-405"></span></p>
<p>The complete class with options for different widths and background images. A rollover state stored within the background image and accessed through negative padding would be a simple addition (see the Filament Group post). The class works in Firefox 2+, Safari 3+, Google Chrome, and Internet Explorer 6/7/8.</p>
<hr />
<p>Example images:</p>
<p>input-btn.png<br />
<img src="http://www.withoutnations.com/wp-content/uploads/2009/11/input-btn.png" alt="input-btn" title="input-btn" width="265" height="25" class="size-full wp-image-424" /></p>
<p>input-btn-link.png<br />
<img src="http://www.withoutnations.com/wp-content/uploads/2009/11/input-btn-link.png" alt="input-btn-link" title="input-btn-link" width="275" height="65" class="size-full wp-image-426" /></p>
<p>input-btn_small.png<br />
<img src="http://www.withoutnations.com/wp-content/uploads/2009/11/input-btn_small.png" alt="input-btn_small" title="input-btn_small" width="100" height="25" class="size-full wp-image-427" /></p>
<hr />
<p>CSS:</p>
<pre>
<code>/*---------------------------------
input type=submit, &lt;p&gt; etc
---------------------------------*/
/* basic class */
.input-btn {
	margin: 0;
	padding: 0;
	float: right; /* either float or display: block */
	color: #FFF;
	font-size: 1em;
	border: none;
	cursor: pointer;
	overflow: visible;
	background: transparent url(input-btn.png) no-repeat 0 0;
	height: 25px;
	text-align: center;
	width: 265px;
	/* Firefox on the PC may need font-family redefined: */
	font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
	}
input::-moz-focus-inner {
	border: none;
	}
input.input-btn:hover {text-decoration: underline;}</code>
</pre>
<pre>
<code>/* + different widths */
.input-btn.small {
	background: #FFF url(input-btn_small.png) no-repeat 0 0;
	width: 100px;
	}
.input-btn.medium {
	background: #FFF url(input-btn_medium.png) no-repeat 0 0;
	width: 150px;
	}
.input-btn.large {
	background: #FFF url(input-btn_large.png) no-repeat 0 0;
	width: 185px;
	}</code>
</pre>
<p>The same style applied to an anchor tag, very flexible with width. Requires /span/ or similar.</p>
<pre>
<code>/*---------------------------------
a: span
---------------------------------*/

a.input-btn-link {
	margin: 0;
	padding: 0 15px 0 0;
	display: block;
	text-align: center;
	width: 170px;
	background: transparent url(input-btn-link.png) no-repeat right -40px;
	text-decoration: none;
	}
a.input-btn-link span {
	display: block;
	margin: 0;
	padding: 5px 0 5px 12px;
	height: 15px;
	color: #FFF;
	background: transparent url(input-btn-link.png) no-repeat top left;
	font-size: 1em;
	line-height: 1.3em;
	white-space: nowrap;
	}
a.input-btn-link span:hover {text-decoration: underline;}</code>
</pre>
<pre>
<code>/* custom width */
a.input-btn-link.small {width: 100px;}
a.input-btn-link.large {width: 250px;}</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.withoutnations.com/2009/11/29/styling-input-and-anchor-tags-as-action-buttons-with-cross-platform-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE6 Considered</title>
		<link>http://www.withoutnations.com/2009/09/05/ie6-considered/</link>
		<comments>http://www.withoutnations.com/2009/09/05/ie6-considered/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 19:42:43 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Ink]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[Andy Clarke]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.withoutnations.com/?p=252</guid>
		<description><![CDATA[As my earlier post made clear, I have dropped support for Internet Explorer 6 &#8212; the percentage of visitors to this site who are still running the browser is negligible. However, I feel compelled to offer a compromise. Andy Clarke posted a very clever solution on his site a few months ago; a notion to serve [...]]]></description>
			<content:encoded><![CDATA[<p>As my <a href="http://www.withoutnations.com/2009/08/09/a-note-on-internet-explorer-6/">earlier post</a> made clear, I have dropped support for Internet Explorer 6 &#8212; the percentage of visitors to this site who are still running the browser is negligible. However, I feel compelled to offer a compromise. <a href="http://forabeautifulweb.com/blog/about/universal_internet_explorer_6_css/">Andy Clarke posted a very clever solution</a> on his site a few months ago; a notion to serve the same basic, content-focused stylesheet to all IE6 users. He was then gracious enough to host it at Google Code as well. I have implemented that universal stylesheet on this site. Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.withoutnations.com/2009/09/05/ie6-considered/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
