<?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; vertical-align</title>
	<atom:link href="http://www.last-child.com/category/css/vertical-align/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>Using vertical-align for images and buttons</title>
		<link>http://www.last-child.com/using-vertical-align-for-images-and-buttons/</link>
		<comments>http://www.last-child.com/using-vertical-align-for-images-and-buttons/#comments</comments>
		<pubDate>Tue, 28 Feb 2006 04:32:15 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Form]]></category>
		<category><![CDATA[Form Button]]></category>
		<category><![CDATA[vertical-align]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">http://www.last-child.com/using-vertical-align-for-images-and-buttons/</guid>
		<description><![CDATA[I&#8217;m working on a basic search form and the visual design requires a graphic button instead of the browser-generated input. I&#8217;m using the button tag instead of an input type=&#8221;submit&#8221;. While putting the page together, I had a nagging issue with the button not aligning with the label and input. I tried various combinations of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a basic search form and the visual design requires a graphic button instead of the browser-generated input. I&#8217;m using the button tag instead of an input type=&#8221;submit&#8221;. While putting the page together, I had a nagging issue with the button not aligning with the label and input. I tried various combinations of margins, negative-margins, padding, and even floated the elements.  All of these techniques eventually worked, but the were too klunky and I knew there had to be a better way.</p>
<p>I remembered the <em>vertical-align:middle</em> style while working on a footer paragraph that included inline links and RSS buttons. I tried it with the submit button and it also worked perfectly.  I&#8217;ve tested this in FF 1.5 and IE6. I have not tested it in Safari yet.</p>
<h3>Code Examples</h3>
<p>CSS:<br />
<code lang="CSS"><br />
form#foo button {vertical-align:middle; border:none; padding:0; background:none; cursor:pointer; *cursor:hand; /*alternate cursor for IE*/}<br />
</code></p>
<p>HTML<br />
<code lang="XHTML"></p>
<form>...<br />
<button name="submit" type="submit"><br />
<img src="/images/btn-form-submit.png" alt="submit search form" /><br />
</button><br />
</code></p>
<h3>Resources</h3>
<ul>
<li><a href='http://www.w3.org/Style/XSL/TestSuite/contrib/XEP/Tests/images-inline.pdf#search='' '>W3.Org test (.pdf)</a></li>
<li><a href="http://www.w3.org/Style/Examples/007/center.html#vertical">W3.Org example</a></li>
<li><a href="http://www.meyerweb.com/eric/css/tests/css2/sec10-08b.htm">Eric Meyer&#8217;s CSS2 test</a></li>
<li><a href="http://rollyo.com/search.html?q=vertical-align%3Amiddle&#038;sid=4886">Standardista search for vertical-align</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/using-vertical-align-for-images-and-buttons/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

