<?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>Design Shack &#187; multiple</title>
	<atom:link href="http://designshack.net/tag/multiple/feed" rel="self" type="application/rss+xml" />
	<link>http://designshack.net</link>
	<description>Inspiration, CSS Gallery &#38; Community News</description>
	<lastBuildDate>Thu, 09 Feb 2012 06:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Introduction to CSS3 &#8211; Part 6: Backgrounds</title>
		<link>http://designshack.net/articles/introduction-to-css3-part-6-backgrounds/</link>
		<comments>http://designshack.net/articles/introduction-to-css3-part-6-backgrounds/#comments</comments>
		<pubDate>Tue, 27 May 2008 16:12:35 +0000</pubDate>
		<dc:creator>David Appleyard</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[back]]></category>
		<category><![CDATA[backgrounds]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[ground]]></category>
		<category><![CDATA[multiple]]></category>
		<category><![CDATA[origin]]></category>
		<category><![CDATA[resizing]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=179</guid>
		<description><![CDATA[For the last part of our introductory series to CSS3, we will be taking a look at the new background properties. These include background size, using more than one background for an element, and background origin (which effects the position of a background). The new features allow greater control of the background element and will [...]]]></description>
			<content:encoded><![CDATA[<p>For the last part of our introductory series to CSS3, we will be taking a look at the new background properties. These include background size, using more than one background for an element, and background origin (which effects the position of a background).</p>
<p>The new features allow greater control of the background element and will provide designers with a whole array of new possibilities.  As usual, examples can be found below:</p>
<p><a href="http://www.designshack.net/tutorialexamples/css3/css3examples.html" class="smallbox">View the live examples page</a></p>
<h2>Background Size</h2>
<p>Before CSS3, background size was determined by the actual size of the image used. It will be possible with the next CSS revision to specify in terms of percentage or pixels how large a background image should be. This will allow you to re-use images in several different contexts and also expand a background to fill an area more accurately.</p>
<p>The following is a simple example of resizing the Design Shack logo as a background in the top left hand area of a div:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.backgroundsize</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">http://www.designshack.net/images/logo.gif</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
-webkit-background-<span style="color: #000000; font-weight: bold;">size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">137px</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
-khtml-background-<span style="color: #000000; font-weight: bold;">size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">137px</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
-o-background-<span style="color: #000000; font-weight: bold;">size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">137px</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
background-<span style="color: #000000; font-weight: bold;">size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">137px</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-repeat</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">60px</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ddccb5</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><img src="http://www.designshack.net/postimages/backgroundresize.gif" alt="CSS3 Background Resizing" /></p>
<h2>Multiple Backgrounds</h2>
<p>The new ability to use multiple backgrounds is a great time saver, allowing you to achieve effects which previously required more than one <code>div</code>. Whether it will be possible to combine this with <code>background-size</code> will be interesting to see.</p>
<p>The example below uses one background for the top border, one repeated vertically for the left and right borders and a third at the bottom.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.multiplebackgrounds</span> <span style="color: #00AA00;">&#123;</span> 
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">150px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">270px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">40px</span> <span style="color: #933;">20px</span> <span style="color: #933;">20px</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">top.gif</span><span style="color: #00AA00;">&#41;</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">,</span>
<span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">bottom.gif</span><span style="color: #00AA00;">&#41;</span> <span style="color: #000000; font-weight: bold;">bottom</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">,</span>
<span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">middle.gif</span><span style="color: #00AA00;">&#41;</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #993333;">repeat-y</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><img src="http://www.designshack.net/postimages/multiplebackgrounds.gif" alt="CSS3 Multiple Backgrounds" /></p>
<h2>Background Origin</h2>
<p>CSS3 allows you to specify how the position of a background is calculated. The <code>background-origin</code> property can be set to start positioning from either the <code>border</code>, <code>padding</code>, or <code>content</code>. This allows for greater flexibility in terms of placing a background image.</p>
<h2>In conclusion&#8230;</h2>
<p>There are a whole new variety of background options available with CSS3. As with all the other modules covered in this introductory series, it leads to greater flexibility and makes it much easier to recreate previously complex effects. Whilst not supported by most browsers as yet, it shouldn&#8217;t be too long before you can get creating stunning user interfaces with these new additions.</p>
<p>We really hope that you have enjoyed this series, and we&#8217;ll be keeping you up to date on all the latest CSS3 developments as they happen over coming months. Here&#8217;s looking forward to the next generation of style sheets!</p>
<h2>Other posts in the series</h2>
<ul>
<li><a href="http://designshack.net/tutorials/introduction-to-css3-part-1-what-is-it">Introduction to CSS3 &#8211; Part 1: What is it?</a></li>
<li><a href="http://designshack.net/tutorials/introduction-to-css3-part-2-borders">Introduction to CSS3 &#8211; Part 2: Borders</a></li>
<li><a href="http://designshack.net/tutorials/introduction-to-css3-part-3-text-effects">Introduction to CSS3 &#8211; Part 3: Text Effects</a></li>
<li><a href="http://designshack.net/tutorials/introduction-to-css3-part-4-user-interface">Introduction to CSS3 &#8211; Part 4: User Interface</a></li>
<li><a href="http://designshack.net/tutorials/introduction-to-css3-part-5-multiple-columns">Introduction to CSS3 &#8211; Part 5: Multiple Columns</a></li>
<li><a href="http://designshack.net/tutorials/introduction-to-css3-part-6-backgrounds">Introduction to CSS3 &#8211; Part 6: Backgrounds</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/introduction-to-css3-part-6-backgrounds/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Introduction to CSS3 &#8211; Part 5: Multiple Columns</title>
		<link>http://designshack.net/articles/introduction-to-css3-part-5-multiple-columns/</link>
		<comments>http://designshack.net/articles/introduction-to-css3-part-5-multiple-columns/#comments</comments>
		<pubDate>Mon, 19 May 2008 16:19:22 +0000</pubDate>
		<dc:creator>David Appleyard</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[columns]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[multicolumn]]></category>
		<category><![CDATA[multiple]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=185</guid>
		<description><![CDATA[Multiple columns are a major facet of laying out text &#8211; newspapers have used them for decades. So important are they that it is amazing that the current way to achieve a multi column layout is one of the most complex techniques for a new designer to grasp. CSS3 introduces a new module known, appropriately, [...]]]></description>
			<content:encoded><![CDATA[<p>Multiple columns are a major facet of laying out text &#8211; newspapers have used them for decades. So important are they that it is amazing that the current way to achieve a multi column layout is one of the most complex techniques for a new designer to grasp.</p>
<p>CSS3 introduces a new module known, appropriately, as multi-column layout. It allows you to specify how many columns text should be split down into and how they should appear. As usual, examples can be found below:</p>
<p><a href="http://www.designshack.net/tutorialexamples/css3/css3examples.html" class="smallbox">View the live examples page</a></p>
<h2>Multiple columns using CSS3</h2>
<p>At present, this feature is available in Firefox and Safari 3. When the module becomes finalised in the CSS3 specification it will be adopted by other browsers and rolled into their updates.</p>
<p>There are four properties which relate to the multiple column layout in CSS3, allowing you to set the number of columns, width, gap between each column and a border between each:</p>
<ul>
<li>column-count</li>
<li>column-width</li>
<li>column-gap</li>
<li>column-rule</li>
</ul>
<p>At present, a browser specific selector is also needed to identify whether Safari or Firefox should display the selector. The code to be used to create a two column layout with a 1px rule between columns would be:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.multiplecolumns</span> <span style="color: #00AA00;">&#123;</span>
-moz-column-<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">130px</span><span style="color: #00AA00;">;;</span>
-webkit-column-<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">130px</span><span style="color: #00AA00;">;</span>
-moz-column-gap<span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
-webkit-column-gap<span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
-moz-column-rule<span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ddccb5</span><span style="color: #00AA00;">;</span>
-webkit-column-rule<span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ddccb5</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><img src="http://www.designshack.net/postimages/multiplecolumns.png" alt="Multiple columns using CSS3" /></p>
<h2>Spanning columns</h2>
<p>It could also be the case that you would like an element to span more than one column &#8211; a heading, table or image for instance. This is facilitated in the specification through the use of:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">h2 <span style="color: #00AA00;">&#123;</span>
column-span<span style="color: #00AA00;">:</span> all
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Numbers can also be used to allow the element to span a certain number of columns. At present this feature isn&#8217;t implemented in any major browsers, but should provide much needed additional flexibility when designing around this feature. It would allow you to achieve effects such as:</p>
<p><img src="http://www.designshack.net/postimages/multiplecolumns_heading.jpg" alt="Multiple column span using CSS3" /></p>
<h2>In the meantime</h2>
<p>It could still be a while before this feature is supported on enough systems to allow widespread use. A List Apart published in 2005 a <a href="http://www.alistapart.com/articles/css3multicolumn">JavaScript implementation of this capability</a> which allows you to use selectors in the same way and offers support in all major browsers. It should also degrade nicely when the feature is widely adopted and the JavaScript is no longer needed. It is a great interim solution if you&#8217;re desperate for multiple columns on your site.</p>
<h2>In conclusion&#8230;</h2>
<p>Multiple column layout will save a huge headache for many designers, allowing greater control of how copy is displayed. You can read the full specification for multi-column at the <a href="http://www.w3.org/TR/css3-multicol/">W3 site</a> if you&#8217;d like more information about the feature.</p>
<p>The next, and final, article in this series will be looking at the different background features available in CSS3 including using more than one background for an element, and specifying the size of backgrounds. Remember, to see live examples of these features, take a look at our <a href="http://www.designshack.net/tutorialexamples/css3/css3examples.html">CSS3 example page</a>.</p>
<h2>Other posts in the series</h2>
<ul>
<li><a href="http://designshack.net/tutorials/introduction-to-css3-part-1-what-is-it">Introduction to CSS3 &#8211; Part 1: What is it?</a></li>
<li><a href="http://designshack.net/tutorials/introduction-to-css3-part-2-borders">Introduction to CSS3 &#8211; Part 2: Borders</a></li>
<li><a href="http://designshack.net/tutorials/introduction-to-css3-part-3-text-effects">Introduction to CSS3 &#8211; Part 3: Text Effects</a></li>
<li><a href="http://designshack.net/tutorials/introduction-to-css3-part-4-user-interface">Introduction to CSS3 &#8211; Part 4: User Interface</a></li>
<li><a href="http://designshack.net/tutorials/introduction-to-css3-part-5-multiple-columns">Introduction to CSS3 &#8211; Part 5: Multiple Columns</a></li>
<li><a href="http://designshack.net/tutorials/introduction-to-css3-part-6-backgrounds">Introduction to CSS3 &#8211; Part 6: Backgrounds</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/introduction-to-css3-part-5-multiple-columns/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Object Caching 262/292 objects using disk: basic

Served from: designshack.net @ 2012-02-09 18:00:12 -->
