<?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>ExplodingBoy &#187; css</title>
	<atom:link href="http://www.exploding-boy.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.exploding-boy.com</link>
	<description>A weblog about design, music, entertainment and life.</description>
	<lastBuildDate>Wed, 20 Jul 2011 15:57:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Simple Time Sensitive CSS</title>
		<link>http://www.exploding-boy.com/2008/06/16/simple-time-sensitive-css/</link>
		<comments>http://www.exploding-boy.com/2008/06/16/simple-time-sensitive-css/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 13:45:05 +0000</pubDate>
		<dc:creator>Christopher</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Site]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.exploding-boy.com/?p=267</guid>
		<description><![CDATA[With the most recent redesign of this site, about a year ago, I decided I wanted to mix things up a little and display a different look/design for each month. I wanted the main page of the site to change with each month, but have the individual entries maintain the look of the month it [...]]]></description>
			<content:encoded><![CDATA[<p>With the most recent redesign of this site, about a year ago, I decided I wanted to mix things up a little and display a different look/design for each month. I wanted the main page of the site to change with each month, but have the individual entries maintain the look of the month it was written. Using a little bit of PHP, 13 different stylesheets, and some handy WordPress conditionals I was able to do just that.<br />
<span id="more-267"></span></p>
<h4>Stylesheets A&#8217; Plenty</h4>
<p>I started by first creating 13 different stylesheets. The first one I created was a base stylesheet containing the basic structure of site. The other stylesheets containing color changes to the header, headings, and link colors, were created for every month. I saved each of the monthly stylesheets by month number, so September&#8217;s stylesheet was saved as 9.css, June&#8217;s was 6.css and December&#8217;s was 12.css. You can take a look through the archived entries on this site to see the various styling for each month.</p>
<h4>Taking Advantage of WordPress Conditional Tags</h4>
<p><a href="http://codex.wordpress.org/Conditional_Tags">WordPress conditional tags</a> are an easy way to tell WordPress to alter various elements within your theme depending on certain conditions. Most early themes for WordPress take advantage of conditional tags to display different content in the sidebar of a page depending on your current location on the site. In order to keep the current month&#8217;s look on the front page of my site, but have the individual entries maintain the look of the month it was written I set up a conditional that said if the page <code>is_single() </code> then display the stylesheet of the month it was published. If we are not on a single entry page then display the current month&#8217;s stylesheet. Here&#8217;s what it looks like:<br />
<code><br />
&lt; ?php if (is_single() ) { ?&gt;<br />
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://sitename.com/&lt;?php the_time('n'); ?&gt;.css&quot; /&gt;<br />
&lt; ?php } else { ?&gt;<br />
&lt;link rel=&quot;stylesheet&rdquo; type=&quot;text/css&quot; href=&quot;http://sitename.com/&lt;?php echo date('n'); ?&gt;.css&quot; /&gt;<br />
&lt; ?php } ?&gt;<br />
</code></p>
<h4>PHP</h4>
<p>Notice the small bit of PHP within the conditional we set up &#8211; <code>&lt;?php echo date('n'); ?&gt;</code>?  I replaced the name of the imported CSS file with a short snippet of PHP, which in turn generates a numerical value of one through twelve depending on the month, and appends the *.css file extension. This is why I saved my monthly stylesheets by month number. You can read more about the <a href="http://us.php.net/datetime">PHP Date/Time functions</a> and decide what format is best for you.</p>
<h4>Options</h4>
<p>If you are not using WordPress you can still easily accomplish the same switching of stylesheets with some simple javascript or server side methods. Once you are familiar with some the options of the PHP Date/Time functions you can experiment with changing the look of your site at any interval you like.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exploding-boy.com/2008/06/16/simple-time-sensitive-css/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Updated Centered Sliding Doors Menus</title>
		<link>http://www.exploding-boy.com/2006/11/02/updated-centered-sliding-doors-menus/</link>
		<comments>http://www.exploding-boy.com/2006/11/02/updated-centered-sliding-doors-menus/#comments</comments>
		<pubDate>Thu, 02 Nov 2006 20:54:01 +0000</pubDate>
		<dc:creator>Christopher</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[menus]]></category>
		<category><![CDATA[sliding-doors]]></category>

		<guid isPermaLink="false">http://www.exploding-boy.com/2006/11/02/updated-centered-sliding-doors-menus/</guid>
		<description><![CDATA[A few days back I received a comment from a reader asking for help using the centered sliding door menus that I had expanded upon from Ethan Marcotte’s original tutorial. The commenter explained that the menus were acting a little buggy in IE7 so I decided to download IE7 and try to find a way [...]]]></description>
			<content:encoded><![CDATA[<p>A few days back I received a <a href="http://www.exploding-boy.com/2006/01/31/centered-sliding-doors-menus/#comment-4995">comment</a> from a reader asking for help using the <a href="http://www.exploding-boy.com/2006/01/31/centered-sliding-doors-menus">centered sliding door menus</a> that I had expanded upon from Ethan Marcotte’s original tutorial. The commenter explained that the menus were acting a little buggy in IE7 so I decided to download IE7 and try to find a way to solve things. After a couple of small changes in the stylesheet the menus should now be fully functional in IE, Firefox, and Safari. Enjoy!</p>
<p><a href="http://www.exploding-boy.com/images/center/center.html">View menu example</a>.<strong>(Updated 11/4/06)</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.exploding-boy.com/2006/11/02/updated-centered-sliding-doors-menus/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>QuickTip: Scrollable Divs</title>
		<link>http://www.exploding-boy.com/2006/10/03/quicktip-scrollable-divs/</link>
		<comments>http://www.exploding-boy.com/2006/10/03/quicktip-scrollable-divs/#comments</comments>
		<pubDate>Tue, 03 Oct 2006 12:46:14 +0000</pubDate>
		<dc:creator>Christopher</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[divs]]></category>
		<category><![CDATA[overflow]]></category>
		<category><![CDATA[scrollbar]]></category>

		<guid isPermaLink="false">http://www.exploding-boy.com/2006/10/03/quicktip-scrollable-divs/</guid>
		<description><![CDATA[When creating a website, you may have a situation where you need to include far more content into a certain area than the design can really accommodate. An easy way to accomplish this is to create a scrolling div area that will automatically scroll when there is an overflow of content within the div. A [...]]]></description>
			<content:encoded><![CDATA[<p>When creating a website, you may have a situation where you need to include far more content into a certain area than the design can really accommodate. An easy way to accomplish this is to create a scrolling div area that will automatically scroll when there is an overflow of content within the div. A great example of this method in action is on the <a href="http://9rules.com/en/browse/design/">9rules community pages</a>. A scrollable div is used on the right to display all of the sites within a single community in a limited amount of space.</p>
<p><span id="more-183"></span></p>
<p>The effect looks a lot like an iframe, but is not near as messy and is more search engine friendly. To recreate this effect, start by creating a normal div with all of the content you want to scroll within that div. To make the div display a scrollbar you must use the <a href="http://www.w3.org/TR/CSS21/visufx.html#propdef-overflow">overflow element</a> in the CSS. By simply adding “<code>overflow: auto</code>” to your styles, the div will then scroll when there is an overflow of content. Here is what your style sheet would look like for this div:</p>
<p><code><br />
#scrollingdiv {<br />
  color: #333;<br />
  border: 1px solid #DDD;<br />
  padding: 5px;<br />
  width: 215px;<br />
  height: 150px;<br />
  <strong>overflow: auto;</strong><br />
}<br />
</code></p>
<p>Below are the results using the styles above:</p>
<p></p>
<div style="color: #666; border: 1px solid #DDD; padding: 10px; width: 215px; height: 150px; overflow: auto;">
<strong>&#8212; Below is our scrolling content &#8212;</strong><br />
</p>
<ul>
<li>Line Item One</li>
<li>Line Item Two</li>
<li>Line Item Three</li>
<li>Line Item Four</li>
<li>Line Item Five</li>
</ul>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc ultricies neque id orci. Maecenas vitae nisi sed risus sollicitudin tincidunt. Vivamus massa. Donec in est vel pede molestie fringilla. Nam vitae ipsum. Sed venenatis hendrerit ipsum. Mauris sem justo, cursus nec, congue ac, consequat et, metus. Sed commodo sollicitudin velit. Nulla facilisi. Aenean placerat ante at urna. Donec a arcu.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.exploding-boy.com/2006/10/03/quicktip-scrollable-divs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starting with CSS &#8211; 14 Tips</title>
		<link>http://www.exploding-boy.com/2006/08/24/starting-with-css-14-tips/</link>
		<comments>http://www.exploding-boy.com/2006/08/24/starting-with-css-14-tips/#comments</comments>
		<pubDate>Thu, 24 Aug 2006 12:54:19 +0000</pubDate>
		<dc:creator>Christopher</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.exploding-boy.com/2006/09/08/starting-with-css-14-tips/</guid>
		<description><![CDATA[I often receive emails from people asking what steps to take to learn CSS and how to create CSS based layouts. I usually respond by suggesting a few books and offer up a few hints of my own. The following tips are what I have found work best for me. They may seem very basic [...]]]></description>
			<content:encoded><![CDATA[<p>I often receive emails from people asking what steps to take to learn <acronym title="Cascading Style Sheets">CSS</acronym> and how to create <acronym title="Cascading Style Sheets">CSS</acronym> based layouts. I usually respond by suggesting a few books and offer up a few hints of my own. The following tips are what I have found work best for me. They may seem very basic to some, but can be very valuable to others.</p>
<p><span id="more-170"></span></p>
<h4>1. Ids Once, Classes a Bunch</h4>
<p>Classes can be used as many times as needed within a document, but IDs can only be applied once within a document. IDs are preceded by a pound sign (#). Classes are preceded by period (.). Use IDs when there is only one occurence per page. Use classes when there are one or more occurences per page.</p>
<h4>2. Organize Your Styles</h4>
<p>There is nothing more frustrating than searching through lots of unorganized styles trying to find the right one to edit. I like to breakdown all my styles into sections, and even include a table of contents. Other people will alphabetize their styles, while others will indent. These are just a few simple way to organize your styles, and make things a lot easier to find. You’ll have to find which method works best for you.</p>
<h4>3. Use Meaningful Names</h4>
<p>I always recommend using meaningful names for your layouts.</p>
<p><code><br />
#id1{<br />
	/* Some styling */<br />
}<br />
#id2 {<br />
	/* Some styling */<br />
}<br />
#id3 {<br />
	/* Some styling */<br />
}<br />
</code></p>
<p><code>#id1</code>, <code>#id2</code>, and <code>#id3</code> doesn’t really explain much about the style and can easily confuse you when making changes. The following styles give you a lot better idea of what you are really working with.</p>
<p><code><br />
#heading {<br />
	/* Some styling */<br />
}<br />
#navigation {<br />
	/* Some styling */<br />
}<br />
#maincontent {<br />
	/* Some styling */<br />
}<br />
</code></p>
<h4>4. Case Sensitivity</h4>
<p>Element names in selectors are case sensitive. <code>.footerlinks</code> is <strong>not</strong> the same as <code>.FooterLinks</code>. I recommend always using lowercase for element names in <acronym title="Cascading Style Sheets">CSS</acronym> selectors. If you do decide to capitilize element names, make sure you also do so in your <acronym title="HyperText Markup Language">HTML</acronym>.</p>
<h4>5. Use Valid Markup and <acronym title="Cascading Style Sheets">CSS</acronym></h4>
<p>This may seem like a bit of a no-brainer, but I felt it needed to be mentioned. Check both your <a href="http://validator.w3.org/">markup</a> and <a href="http://jigsaw.w3.org/css-validator/"><acronym title="Cascading Style Sheets">CSS</acronym></a> with <acronym title="World Wide Web Consortium">W3C</acronym> validators.</p>
<h4>6. Avoid Overly Specific Names</h4>
<p>Your names should relate to your content, not your presentation. While an element name like .redtext may help you find what you are looking for when you first create your site, what happens in 3 months when either you or your client decide to change those to some other color, and you end up with the following?</p>
<p><code><br />
.redtext {<br />
	color:blue;<br />
}<br />
</code></p>
<h4>7. Link Styles in the Right Order</h4>
<p>When applying <acronym title="Cascading Style Sheets">CSS</acronym> to the different states of a link you’ll want to specify them in the order <code>:link :visited :hover :active</code>. Some people choose to remember this order by “LoVe HAte” or “LVHA” for short.</p>
<h4>8. Group Your Selectors</h4>
<p>When several elements share the same properties you can group these properties to avoid having to specify the same properties several times.</p>
<p><code><br />
h1, h2, h3, h4 {<br />
	font-family: 'Century Gothic', 'Lucida Grande', 'Trebuchet <acronym title="Microsoft">MS</acronym>', Verdana, Sans-Serif;<br />
}<br />
</code></p>
<h4>9. Remove Default Values</h4>
<p>The following style removes default padding and margin on all elements, so you can eliminate the need to specify a value for these properties.</p>
<p><code><br />
* {<br />
	margin:0;<br />
	padding:0;<br />
}<br />
</code></p>
<h4>10. Use Comments to Help Explain Styles</h4>
<p>When starting out with <acronym title="Cascading Style Sheets">CSS</acronym> you might forget why a style has certain properties. Use can easily add notes to your stylesheet to better explain things, and avoid deleting something you might need.</p>
<p><code><br />
#footer {<br />
	background: #333; /* This controls the color of our footer*/<br />
	color:#FFF; /* This controls the color of text in the footer */<br />
	margin: 10px 0px 0px; /* Adds a 10px margin to the top */<br />
}<br />
</code></p>
<h4>11. Add Closing Tag Comments to Markup</h4>
<p>To easily keep track of your divs that have lots of content add a small closing comment after the closing tag.
</p>
<p><code><br />
&lt;div id="wrapper"&gt;<br />
	&lt;div id="navigation"&gt;...&lt;/div&gt;<br />
	&lt;div id="maincontent"&gt;...&lt;/div&gt;<br />
	&lt;div id="subcontent"&gt;...&lt;/div&gt;<br />
&lt;/div&gt;&lt;!--#wrapper closing--&gt;<br />
</code></p>
<h4>12. Check Designs in Good Browsers First</h4>
<p>I always test my designs first in Safari and Firefox, then move on to the evil mistress that is Internet Explorer. I’ve never understood those that start testing with an inferior browser.</p>
<h4>13. Look at Others</h4>
<p>See how others created their layouts. Dig through their <acronym title="Cascading Style Sheets">CSS</acronym>, look at their markup, but <strong>do not steal</strong>. If you don’t understand how they created their layout send them a polite email asking for help. You’ll be surprised that most people are willing to help if you go about asking the right way.</p>
<h4>14. Save a Basic Stylesheet</h4>
<p>Once you have a created and tested a layout you like, save it! You can go back and use the same inital stylesheet again and again. I always recommened saving the structure for 2 column, 3 column, and single column layouts. It will save you a lot time and headaches.</p>
<p>When it comes to designing without tables most folks are learning as they go. You <strong>will</strong> get frustrated. You will rant, rave, begin to loathe all that is <acronym title="Internet Explorer">IE</acronym>, and maybe even give up a few times. The key I’ve found is to take baby steps. Your first steps might be to do away with font tags or use a <acronym title="Cascading Style Sheets">CSS</acronym>/table hybrid layout, but as you get more comfortable with <acronym title="Cascading Style Sheets">CSS</acronym> you can slowly take steps forward. With each project I learn more and more and seem to change my methods. There are millions of different ways to accomplish <acronym title="Cascading Style Sheets">CSS</acronym> layouts. You have to find what works best for you. The sense of reward and pride you will have from learning something new and creating a standards based <acronym title="Cascading Style Sheets">CSS</acronym> layout is well worth all the effort.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exploding-boy.com/2006/08/24/starting-with-css-14-tips/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Centered Sliding Doors Menus</title>
		<link>http://www.exploding-boy.com/2006/01/31/centered-sliding-doors-menus/</link>
		<comments>http://www.exploding-boy.com/2006/01/31/centered-sliding-doors-menus/#comments</comments>
		<pubDate>Wed, 01 Feb 2006 01:28:58 +0000</pubDate>
		<dc:creator>Christopher</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[menus]]></category>
		<category><![CDATA[sliding-doors]]></category>

		<guid isPermaLink="false">http://www.exploding-boy.com/2006/01/31/centered-sliding-doors-menus/</guid>
		<description><![CDATA[I know myself and a lot of designers were very excited after reading Ethan Marcotte&#8217;s method of centering sliding doors tabs last month over at 24 ways. I had been waiting for someone to help solve the float issue with the sliding doors technique for a very long while. I enjoyed the article but thought [...]]]></description>
			<content:encoded><![CDATA[<p>I know myself and a lot of designers were very excited after reading <a href="http://sidesh0w.com/">Ethan Marcotte&#8217;s</a> method of <a href="http://24ways.org/advent/centered-tabs-with-css">centering sliding doors tabs</a> last month over at <a href="http://24ways.org/">24 ways</a>. I had been waiting for someone to help solve the float issue with the sliding doors technique for a very long while. I enjoyed the article but thought it was lacking a few presentation elements that help to make the sliding doors technique so nice. I wanted to find a way to add the nice single-image rollover effects for Ethan&#8217;s centered tabs that <a href="http://www.stopdesign.com/">Douglas Bowman</a> had in his article at <a href="http://www.alistapart.com/articles/slidingdoors2/">A List Apart</a>. After lots of ranting, raving, fussing, cussing, and the destroying of what was Ethan&#8217;s original code I managed to hammer out a method of <a href="http://www.exploding-boy.com/images/center/center.html">centered sliding door tabs</a> complete with an active tab, that have been tested and work in IE, Firefox, and Safari.</p>
<p><a href="http://www.exploding-boy.com/images/center/center.html">View menu example</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exploding-boy.com/2006/01/31/centered-sliding-doors-menus/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

