<?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>class &#8211; Thesis Docs</title>
	<atom:link href="https://diythemes.com/thesis/rtfm/tag/class/feed/" rel="self" type="application/rss+xml" />
	<link>https://diythemes.com/thesis/rtfm</link>
	<description>Documentation, How-tos, and Best Practices for the Thesis WordPress Theme System</description>
	<lastBuildDate>Sun, 27 Jan 2013 18:29:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>
	<item>
		<title>Conditional CSS for IE</title>
		<link>https://diythemes.com/thesis/rtfm/conditional-css-for-ie/</link>
		
		<dc:creator><![CDATA[Shelley]]></dc:creator>
		<pubDate>Tue, 17 Nov 2009 15:38:37 +0000</pubDate>
				<category><![CDATA[Thesis 1 Documentation]]></category>
		<category><![CDATA[body]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[head]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[ie7]]></category>
		<category><![CDATA[ie8]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[stylesheet]]></category>
		<guid isPermaLink="false">https://diythemes.com/answers/?p=539</guid>

					<description><![CDATA[Two methods for applying IE-specific styles.
<ul>
<li>Add Custom Classes to the Body Tag</li>
<li>Add a Custom IE Stylesheet to Head Section</li>
</ul>]]></description>
										<content:encoded><![CDATA[<p>Two methods for applying IE-specific styles.</p>
<h3 id="body_classes">Add Custom Classes to the Body Tag <a href="#body_classes" title="Link to this section">∞</a></h3>
<p>Place this code in <code>custom_functions.php</code>:</p>
<pre class="php">
function add_ie_classes($classes) {
  $browser = $_SERVER['HTTP_USER_AGENT'];
  if (preg_match(&quot;/MSIE/&quot;, $browser)) {
  $classes[] .= 'ie';
    if (preg_match(&quot;/MSIE 6.0/&quot;, $browser))
	  $classes[] .= 'ie6';
    elseif (preg_match(&quot;/MSIE 7.0/&quot;, $browser))
	  $classes[] .= 'ie7';
    elseif (preg_match(&quot;/MSIE 8.0/&quot;, $browser))
	  $classes[] .= 'ie8';
  }
  return $classes;
}

add_filter('thesis_body_classes', 'add_ie_classes');
</pre>
<p>Note that if you&#8217;re using caching plugins, this method may not be ideal.</p>
<h3 id="head_styles">Add a Custom IE Stylesheet to Head Section <a href="#head_styles" title="Link to this section">∞</a></h3>
<p>Create a stylesheet (named <code>iestyles.css</code> in this example) in your Thesis custom folder to hold your IE-only styles; and then place this code in <code>custom_functions.php</code>:</p>
<pre class="php">
function add_ie_css() {
  $sheet = get_bloginfo('template_url') . '/custom/iestyles.css';
  echo &quot;\n&quot;;
  echo '&lt;!--[if lte IE 8]&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;' . $sheet . '&quot; type=&quot;text/css&quot; media=&quot;screen, projection&quot; /&gt;&lt;![endif]--&gt;';
}

add_action('wp_head','add_ie_css');
</pre>
<p>Note: By placing <code>iestyles.css</code> in the custom folder, it will also become editable using the Thesis Custom File Editor.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Using Custom CSS Classes for Posts and Pages</title>
		<link>https://diythemes.com/thesis/rtfm/custom-css-classes-posts-pages/</link>
		
		<dc:creator><![CDATA[Shelley]]></dc:creator>
		<pubDate>Tue, 09 Jun 2009 14:24:41 +0000</pubDate>
				<category><![CDATA[Thesis 1 Documentation]]></category>
		<category><![CDATA[body]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[custom]]></category>
		<guid isPermaLink="false">https://diythemes.com/answers/?p=371</guid>

					<description><![CDATA[How to use custom CSS classes for your Posts and Pages.]]></description>
										<content:encoded><![CDATA[<p>By default, Thesis automatically adds a specific body class for every Page (not Posts) according to its title. For example, the <code>body</code> tag for your About Page looks like this (assuming you&#8217;ve already enabled the Thesis option to &#8220;Use custom stylesheet&#8221;):</p>
<pre class="html">
&lt;body class=&quot;custom about&quot;&gt;
</pre>
<p>So, for example, if you wanted the <code>h1</code> tag on your &#8220;About&#8221; page to be red (without affecting the same tag when it appears on other pages of your site), you could use this in your <code>custom.css</code> file:</p>
<pre class="css">
.custom.about h1 {
   color: red;
}
</pre>
<p>Category pages are assigned a custom body class based on the category&#8217;s <em>slug</em>. For example, the <code>body</code> tag for the &#8220;General&#8221; category page looks like this:</p>
<pre class="html">
&lt;body class=&quot;custom cat_general&quot;&gt;
</pre>
<p>Archives pages are assigned a custom body class based on the archive type and the time period covered. For example, the <code>body</code> tag for the &#8220;January 2010&#8221; archives page looks like this:</p>
<pre class="html">
&lt;body class=&quot;custom monthly jan_2010&quot;&gt;
</pre>
<p>To assign a custom class to individual Posts, you can use the <em>SEO Details and Additional Style</em> section of the <strong>Edit post</strong> panel. Look for the <code>CSS Class</code> field, and enter the name of the custom class you&#8217;d like to use for the post. (Note: CSS class names cannot begin with numbers!)</p>
<p>You can then specify styles for that particular class name in your <code>custom.css</code> file, similar to the example shown above for the About Page.</p>
<p>(Note that you can also use this same field on the <strong>Edit page</strong> panel, but doing so will replace the default class Thesis already assigns to the <code>body</code> tag with whatever class you&#8217;ve designated instead.)</p>
<ol>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
