<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>has_many :thoughts: CSS attribute selectors</title>
    <link>http://blog.kineticweb.com/articles/2007/08/02/css-attribute-selectors</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Musings from a Ruby on Rails development team</description>
    <item>
      <title>CSS attribute selectors</title>
      <description>&lt;p&gt;Every single day I learn some new &lt;span class="caps"&gt;CSS&lt;/span&gt; tidbit I didn&amp;#8217;t know. Never before did I realize that there was an &lt;strong&gt;attribute&lt;/strong&gt; selector for &lt;span class="caps"&gt;CSS&lt;/span&gt;!&lt;/p&gt;


	&lt;p&gt;As I was working on the stylesheet for our latest project, &lt;a href="http://www.waycoolmail.com"&gt;Way Cool Mail&lt;/a&gt;, I realized I wanted a slightly different style on buttons then I did on text input fields. So I made a class for the buttons and applied it every where I used a button. (I thought about overriding Rails button helper to always use that class. But that seemed dirty.)&lt;/p&gt;


	&lt;p&gt;Now I discovered via &lt;a href="http://www.amazon.com/CSS-Mastery-Advanced-Standards-Solutions/dp/1590596145"&gt;&lt;span class="caps"&gt;CSS&lt;/span&gt; Mastery: Advanced Web Standards Solutions&lt;/a&gt; that one can do something like this:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;input[type=&amp;quot;submit&amp;quot;] {
  border: 1px solid #000
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Of course, it doesn&amp;#8217;t work in &lt;span class="caps"&gt;IE6&lt;/span&gt; and below. (ARGH!!!). So I&amp;#8217;ll either have to keep the separate class or try &lt;a href="http://www.shayna.com/index.cfm?fuseaction=blog.display_entry&amp;#38;id=176"&gt;this handy JS trick&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Thu, 02 Aug 2007 07:21:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:555a8a87-eed7-4e85-b145-d3588f4c7936</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2007/08/02/css-attribute-selectors</link>
      <category>CSS</category>
      <category>Rails</category>
      <trackback:ping>http://blog.kineticweb.com/articles/trackback/50</trackback:ping>
    </item>
  </channel>
</rss>
