<?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>Saffron Stroke - Your Web Design Resource &#187; CSS 2.1</title>
	<atom:link href="http://www.saffronstroke.com/tag/CSS-2.1/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.saffronstroke.com</link>
	<description>Design Blog</description>
	<lastBuildDate>Wed, 11 Jan 2012 06:36:24 +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>To add a shadow to a box using CSS 2.1</title>
		<link>http://www.saffronstroke.com/2010/02/16/to-add-a-shadow-to-a-box-using-css-2-1-2/</link>
		<comments>http://www.saffronstroke.com/2010/02/16/to-add-a-shadow-to-a-box-using-css-2-1-2/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 05:47:00 +0000</pubDate>
		<dc:creator>Minal</dc:creator>
				<category><![CDATA[CSS Hacks, Tips and Tricks]]></category>
		<category><![CDATA[Expression Web]]></category>
		<category><![CDATA[box-shadow]]></category>
		<category><![CDATA[CSS 2.1]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[shadow]]></category>
		<category><![CDATA[shadow effect]]></category>

		<guid isPermaLink="false">http://saffronstroke.wordpress.com/2010/02/16/to-add-a-shadow-to-a-box-using-css-2-1-2/</guid>
		<description><![CDATA[In my previous article; ‘To add a shadow to a box using CSS 3 using the box-shadow property’, we explored the box-shadow property in CSS 3, available in browsers like Safari 3+ and Firefox 3.5+. But plenty of users use Internet Explorer, Chrome, Navigator and such other browsers. How can we have a shadow effect [...]]]></description>
			<content:encoded><![CDATA[<div align="left" style="float: none; clear:right; padding: 0px 5px 5px 0px;"><a name="fb_share" type="button_count" share_url="http://www.saffronstroke.com/2010/02/16/to-add-a-shadow-to-a-box-using-css-2-1-2/"></a></div><div class="tweetmeme_button" style="float: right; margin-left: 10px;; margin-top:-2px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.saffronstroke.com%2F2010%2F02%2F16%2Fto-add-a-shadow-to-a-box-using-css-2-1-2%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.saffronstroke.com%2F2010%2F02%2F16%2Fto-add-a-shadow-to-a-box-using-css-2-1-2%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>In my previous article; ‘To add a shadow to a box using CSS 3 using the box-shadow property’, we explored the box-shadow property in CSS 3, available in browsers like Safari 3+ and Firefox 3.5+. But plenty of users use Internet Explorer, Chrome, Navigator and such other browsers. How can we have a shadow effect in these browsers? One way is through use of images. I have found out a way to get a shadow effect for box like this:</p>
<p><a href="http://www.saffronstroke.com/wp-content/uploads/2010/02/clip_image0021.jpg" rel="lightbox[856]"><img style="display:inline;border-width:0;" title="clip_image002" border="0" alt="clip_image002" src="http://www.saffronstroke.com/wp-content/uploads/2010/02/clip_image002_thumb1.jpg" width="154" height="114" /></a></p>
<p>Though it is not similar to what we would get with the box-shadow property, but we can do with it. Here’s the code:</p>
<p>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</p>
<p>&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;</p>
<p>&lt;head&gt;</p>
<p>&lt;meta content=&quot;text/html; charset=utf-8&quot; http-equiv=&quot;Content-Type&quot; /&gt;</p>
<p>&lt;title&gt;Box Shadow Example&lt;/title&gt;</p>
<p>&lt;style type=&quot;text/css&quot;&gt;</p>
<p>body{</p>
<p>background-color:#ffffff;</p>
<p>}</p>
<p>.box{</p>
<p>background-color: #ffffff;</p>
<p>width:125px;</p>
<p>border: 1px silver solid;</p>
<p>margin: -1em 0 0 -1em;</p>
<p>padding: 0.5em;</p>
<p>}</p>
<p>.shadow{</p>
<p>background-color: silver;</p>
<p>width:125px;</p>
<p>padding: 0.5em;</p>
<p>margin: 1.5em 0 1.5em 2.5em;</p>
<p>}</p>
<p>.tbl {</p>
<p>width: 40%;</p>
<p>}</p>
<p>td{</p>
<p>padding-right:30px;</p>
<p>}</p>
<p>&lt;/style&gt;</p>
<p>&lt;/head&gt;</p>
<p>&lt;body&gt;</p>
<p>&lt;table class=&quot;tbl&quot;&gt;</p>
<p>&lt;tr&gt;</p>
<p>&lt;td&gt;</p>
<p>&lt;div class=&quot;shadow&quot;&gt;</p>
<p>&lt;div class=&quot;box&quot;&gt;</p>
<p>&lt;img src=&quot;maroon_leaves.jpg&quot; alt=”maroon_leaves”/&gt;</p>
<p>&lt;/div&gt;</p>
<p>&lt;/div&gt;</p>
<p>&lt;/td&gt;</p>
<p>&lt;td&gt;</p>
<p>&lt;div class=&quot;shadow&quot;&gt;</p>
<p>&lt;div class=&quot;box&quot;&gt;</p>
<p>&lt;img src=&quot;small_plant.jpg&quot; alt=”small_plant”/&gt;</p>
<p>&lt;/div&gt;</p>
<p>&lt;/div&gt;</p>
<p>&lt;/td&gt;</p>
<p>&lt;/tr&gt;</p>
<p>&lt;tr&gt;</p>
<p>&lt;td&gt;</p>
<p>&lt;div class=&quot;shadow&quot;&gt;</p>
<p>&lt;div class=&quot;box&quot;&gt;</p>
<p>&lt;img src=&quot;small_plant.jpg&quot; alt=”small_plant”/&gt;</p>
<p>&lt;/div&gt;</p>
<p>&lt;/div&gt;</p>
<p>&lt;/td&gt;</p>
<p>&lt;td&gt;</p>
<p>&lt;div class=&quot;shadow&quot;&gt;</p>
<p>&lt;div class=&quot;box&quot;&gt;</p>
<p>&lt;img src=&quot;maroon_leaves.jpg&quot; alt=”maroon_leaves”/&gt;</p>
<p>&lt;/div&gt;</p>
<p>&lt;/div&gt;</p>
<p>&lt;/td&gt;</p>
<p>&lt;/tr&gt;</p>
<p>&lt;/table&gt;</p>
<p>&lt;/body&gt;</p>
<p>&lt;/html&gt;</p>
<p>The output of the above code would be like this:</p>
<p><a href="http://www.saffronstroke.com/wp-content/uploads/2010/02/clip_image004.jpg" rel="lightbox[856]"><img style="display:inline;" title="clip_image004" alt="clip_image004" src="http://www.saffronstroke.com/wp-content/uploads/2010/02/clip_image004_thumb.jpg" width="240" height="175" /></a></p>
<p><b>NOTE:</b> The CSS in the above example is internal and not external. However it is advisable to you, to create an external style sheet and add all the styles to it. Then link the style sheet to your webpage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.saffronstroke.com/2010/02/16/to-add-a-shadow-to-a-box-using-css-2-1-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Classification of elements in CSS</title>
		<link>http://www.saffronstroke.com/2009/06/29/classification-of-elements-in-css/</link>
		<comments>http://www.saffronstroke.com/2009/06/29/classification-of-elements-in-css/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 09:17:30 +0000</pubDate>
		<dc:creator>Minal</dc:creator>
				<category><![CDATA[CSS Hacks, Tips and Tricks]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS 2.1]]></category>
		<category><![CDATA[CSS elements]]></category>
		<category><![CDATA[elements]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://saffronstroke.com/?p=563</guid>
		<description><![CDATA[A document is structured by it elements. The HTML elements that we commonly know are p, div, table, headings, span and many more. In CSS (2.1) each element has its own box that contains the element’s content. Hence these elements are broadly classified as: Replaced and Non-replaced elements Block-level and Inline elements This classification is [...]]]></description>
			<content:encoded><![CDATA[<div align="left" style="float: none; clear:right; padding: 0px 5px 5px 0px;"><a name="fb_share" type="button_count" share_url="http://www.saffronstroke.com/2009/06/29/classification-of-elements-in-css/"></a></div><div class="tweetmeme_button" style="float: right; margin-left: 10px;; margin-top:-2px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.saffronstroke.com%2F2009%2F06%2F29%2Fclassification-of-elements-in-css%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.saffronstroke.com%2F2009%2F06%2F29%2Fclassification-of-elements-in-css%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>A document is structured by it elements. The HTML elements that we commonly know are p, div, table, headings, span and many more. In CSS (2.1) each element has its own box that contains the element’s content. Hence these elements are broadly classified as:</p>
<ul>
<li>Replaced and Non-replaced elements</li>
<li>Block-level and Inline elements</li>
</ul>
<p>This classification is made on the basis of their nature of presentation.</p>
<p><strong>1.       </strong><strong>Replaced elements:</strong></p>
<p>Replaced elements are those where the content of the element is replaced with some content external to that document. For example, the ‘img’ element has no content of its own. It takes the path to the file that needs to be displayed in the box created by the element.</p>
<p><strong>2.       </strong><strong>Non-replaced elements: </strong></p>
<p>All other elements are non-replaced elements. For instance, the ‘p’ (paragraph) element;</p>
<p>&lt;p&gt;Some text &lt;/p&gt;</p>
<p>Other non-replaced elements are div, span, headings, lists, tables, etc.</p>
<p><strong>3.       </strong><strong>Block-level elements:</strong></p>
<p>As the name suggests create a box for their content. It creates a space of its own and adds breaks before and after its box. Examples of Block level elements are ‘p’ and ‘div’.</p>
<p>Lists are also block-level elements. But unlike other block elements, lists have their own set of presentation properties in addition to those inherited from block-level elements. These properties include indentation and bullets (for unordered lists) and numbers (for ordered lists).</p>
<p><strong>4.       </strong><strong>Inline-level elements:</strong></p>
<p>Inline elements spawn an element box within the line of text and do not break the flow of the line. In other words they do not break from rest of the display. The most used inline element is ‘span’. Other examples are ‘a’, ‘strong’.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.saffronstroke.com/2009/06/29/classification-of-elements-in-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

