<?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; text</title>
	<atom:link href="http://designshack.net/tag/text/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 3: Text Effects</title>
		<link>http://designshack.net/articles/introduction-to-css3-part-3-text-effects/</link>
		<comments>http://designshack.net/articles/introduction-to-css3-part-3-text-effects/#comments</comments>
		<pubDate>Fri, 09 May 2008 16:24:01 +0000</pubDate>
		<dc:creator>David Appleyard</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[shadow]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=195</guid>
		<description><![CDATA[The third part in this series on CSS3 will be delving into the new text effects. Typography is, without any doubt, one of the most important aspects to get right when designing a layout. Type can draw the reader through a page, give a certain impression, provide impact, be subtle, or aid in separating content. [...]]]></description>
			<content:encoded><![CDATA[<p>The third part in this series on CSS3 will be delving into the new text effects. Typography is, without any doubt, one of the most important aspects to get right when designing a layout. Type can draw the reader through a page, give a certain impression, provide impact, be subtle, or aid in separating content.</p>
<p>CSS is already reasonably versatile in the way in which text can be displayed, but still constricts design in quite a few areas. CSS3 goes some way towards removing those limitations.</p>
<p>All the examples shown below can be seen at our CSS3 examples page. Many, however, can only be appreciated in the latest builds of various browsers:</p>
<p><a href="http://www.designshack.net/tutorialexamples/css3/css3examples.html" class="smallbox">View the live examples page</a></p>
<h2>Text Shadow</h2>
<p>Text shadows sound a little tacky, but it all depends how they are executed. When experimenting for this article I found some combinations to look terrible, and some to give an attractive, subtle effect. Shadows could definitely be put to good use in headings and titles &#8211; there are some great examples of their use at <a href="http://www.kremalicious.com/2008/04/make-cool-and-clever-text-effects-with-css-text-shadow/">Matthias Kretschmann&#8217;s blog</a>.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.text_shadow</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#897048</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span> <span style="color: #933;">2px</span> <span style="color: #933;">2px</span> <span style="color: #cc00cc;">#ddccb5</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">15px</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/text_shadow.png" alt="CSS3 Text Shadow" /></p>
<h2>Word Wrapping</h2>
<p>At present, if a word is too long to fit within one line of an area, it expands outside. This isn&#8217;t a very common occurrence, but does crop up from time to time. The new word wrapping ability allows you to force the text to wrap &#8211; even if it means splitting it mid-word. The code is incredibly straight forward:</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;"><span style="color: #6666ff;">.text_wrap</span> <span style="color: #00AA00;">&#123;</span>
word-wrap<span style="color: #00AA00;">:</span>  break-word<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><img src="http://www.designshack.net/postimages/text_wrap.png" alt="CSS3 Text Wrapping" /></p>
<h2>Web Fonts</h2>
<p>Whilst these are not classed as a &#8216;text effect&#8217;, we are going to cover them here briefly. A Web Font is simply a way to use any font in your page, being downloaded automatically by the browser. This will be a revolutionary change to web design, which previously has been limited to 10-15 widely supported fonts. However, this new feature brings bring copyright into debate as only properly licensed fonts should be used.</p>
<p>Currently, the latest version of Safari (3.1) is the only browser supporting Web Fonts. Opera is suggested to be another which will soon be enabling support, and the others will no doubt follow at some point in the future. An example of how this could be achieved would be:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@font-face {</span>
<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'Name of the new font'</span><span style="color: #00AA00;">;</span>
src<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'http://www.designshack.net/fonts/font.ttf'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>A few examples of pages have been mocked up using this technique. The following are examples in the vein of CSS Zen Garden, created by <a href="http://www.alistapart.com/articles/cssatten">A List Apart</a>. The linked versions will only work on certain browsers:</p>
<p><a href="http://www.alistapart.com/d/cssatten/heid.html"><img src="http://www.designshack.net/postimages/text_webfonts1.jpg" alt="CSS3 Web Fonts" border="0" /></a>  <a href="http://www.alistapart.com/d/cssatten/poen.html"><img src="http://www.designshack.net/postimages/text_webfonts2.jpg" alt="CSS3 Web Fonts" border="0" /></a>  </p>
<h2>In conclusion&#8230;</h2>
<p>Many of the missing features of CSS2 have been rectified in this update. This article doesn&#8217;t cover all the additions in terms of text &#8211; if you&#8217;re interested, you can read more about <a href="http://www.w3.org/TR/2003/CR-css3-text-20030514/">the text module</a>. All these additions are great when used in a subtle way, enhancing the typographic layout of the page.</p>
<p>The next article in this series will be expanding on some of the user interface enhancements in CSS3. 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-3-text-effects/feed/</wfw:commentRss>
		<slash:comments>22</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 204/217 objects using disk: basic

Served from: designshack.net @ 2012-02-09 14:58:52 -->
