<?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>Sean Gates' Blog &#187; CSS</title>
	<atom:link href="http://www.seangates.com/category/web-development/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.seangates.com</link>
	<description>By the looks of it {he thinks} he knows what he's doing.</description>
	<lastBuildDate>Sat, 10 Jul 2010 21:22:04 +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>Table Cell CSS Alignment Issue</title>
		<link>http://www.seangates.com/2006/11/29/table-cell-css-alignment-issue/</link>
		<comments>http://www.seangates.com/2006/11/29/table-cell-css-alignment-issue/#comments</comments>
		<pubDate>Wed, 29 Nov 2006 19:33:08 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.orwd.com/blog/?p=21</guid>
		<description><![CDATA[A couple of days ago I was working on a portion of my project here at work, and noticed that I could not align a table cell without using inline CSS. This was frustrating because I wanted to be able to globally have a &#8220;caption&#8221; for all the HTML forms I was working on. Here [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago I was working on a portion of my project here at work, and noticed that I could not align a table cell without using inline CSS.  This was frustrating because I wanted to be able to globally have a &#8220;caption&#8221; for all the HTML forms I was working on.  Here is the code for inline styles:</p>
<p><code>&lt;td style="text-align: right; vertical-align: middle;"></code></p>
<p>What I found was that when I took the style out of inline and into the style sheet, it breaks.</p>
<p><code>&lt;td class="caption"></code></p>
<p><code>/* CSS code */<br />
.caption {<br />
text-align: right;<br />
vertical-align: middle;<br />
}</code></p>
<p>Now, if I were to make it an ID selector, it still breaks:<br />
<code>&lt;td id="column_caption"></code></p>
<p><code>/* CSS code */<br />
#column_caption {<br />
text-align: right;<br />
vertical-align: middle;<br />
}</code></p>
<p>This doesn&#8217;t work, even though I am explicit in the element in which I want to align.  After Googling for the answer <a title="I came across something" href="http://msconline.maconstate.edu/tutorials/XHTML/XHTML08/xhtml08-06.htm">I came across something</a> that got me thinking.  Maybe I needed to add context to the CSS.  The following works:</p>
<p><code>&lt;td id="column_caption"></code></p>
<p><code>/* CSS code */<br />
<strong>table td</strong>#column_caption {<br />
text-align: right;<br />
vertical-align: middle;<br />
}</code></p>
<p>You can now notice that adding &#8220;table td&#8221; in front of the ID selector gives it context.  I&#8217;m not sure why, but this was the only solution that worked, allowing me to put my style information into the CSS file instead of inline.  Now, there is a HUGE (IMHO) drawback: since I am using the ID selector I now have to explicitly reference every cell I want to have these attributes.  Thus, I could have something like this:</p>
<p><code>&lt;table><br />
</code><code>&lt;tr></code><code><br />
&lt;td id="column_caption">&nbsp;&lt;/td><br />
</code><code>&lt;td>&nbsp;&lt;/td><br />
</code><code>&lt;/tr></code><code><br />
</code><code>&lt;tr></code><code><br />
&lt;td id="column2_caption">&nbsp;&lt;/td><br />
</code><code>&lt;td>&nbsp;&lt;/td><br />
</code><code>&lt;/tr><br />
</code><code>... more rows here<br />
&lt;/table><br />
</code></p>
<p><code>/* CSS code */<br />
table td#column_caption,<br />
table td#column2_caption,<br />
... more columns referenced here {<br />
text-align: right;<br />
vertical-align: middle;<br />
}</code></p>
<p>Therefore, I can use CSS to make it easier to edit the style, but it is still tedious to have to ID every cell.</p>
<p>Does anyone else have a workaround better than this?</p>
<p>Sean</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seangates.com/2006/11/29/table-cell-css-alignment-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Font Sizing</title>
		<link>http://www.seangates.com/2005/10/28/font-sizing/</link>
		<comments>http://www.seangates.com/2005/10/28/font-sizing/#comments</comments>
		<pubDate>Fri, 28 Oct 2005 21:05:41 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://localhost/wordpress/?p=3</guid>
		<description><![CDATA[Going through the default CSS provided by WordPress has given me some good insight on font sizing. I have had trouble creating fonts that scale correctly, having defaulted to forcing 12pt or 10pt fonts that the user cannot change the size of. So, understanding the em, ex and % usage better will help me in [...]]]></description>
			<content:encoded><![CDATA[<p>Going through the default CSS provided by WordPress has given me some good insight on <a href="http://www.gwumc.edu/library/tutorials/intermedhtml/css/fontsize.html">font sizing</a>. I have had trouble creating fonts that scale correctly, having defaulted to forcing 12pt or 10pt fonts that the user cannot change the size of. So, understanding the em, ex and % usage better will help me in the long run.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seangates.com/2005/10/28/font-sizing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress CSS Comment</title>
		<link>http://www.seangates.com/2005/10/05/wordpress-css-comment/</link>
		<comments>http://www.seangates.com/2005/10/05/wordpress-css-comment/#comments</comments>
		<pubDate>Wed, 05 Oct 2005 16:04:15 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://localhost/wordpress/?p=2</guid>
		<description><![CDATA[I was going in to edit the default WordPress CSS file and found this snippet that was very interesting: /* Using &#8216;class=&#8221;alignright&#8221;&#8216; on an image will (who would&#8217;ve thought?!) align the image to the right. And using &#8216;class=&#8221;centered&#8221;&#8216;, will of course center the image. This is much better than using align=&#8221;center&#8221;, being much more futureproof [...]]]></description>
			<content:encoded><![CDATA[<p>I was going in to edit the default <a href="http://www.wordpress.org">WordPress</a> CSS file and found this snippet that was very interesting:</p>
<blockquote><p>/* Using &#8216;class=&#8221;alignright&#8221;&#8216; on an image will (who would&#8217;ve thought?!) align the image to the right. And using &#8216;class=&#8221;centered&#8221;&#8216;, will of course center the image. This is much better than using align=&#8221;center&#8221;, being much more futureproof (and valid) */</p></blockquote>
<p>It had never occured to me that there would be a need for this since I had always used the css <code>align="center"</code> attribute.</p>
<p>I guess it pays to look at someone else&#8217;s CSS file. :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seangates.com/2005/10/05/wordpress-css-comment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
