<?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>Dave PC Guy &#187; background</title>
	<atom:link href="http://www.davepcguy.com/archive/tag/background/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davepcguy.com</link>
	<description>Computers and Technology</description>
	<lastBuildDate>Fri, 08 Apr 2011 15:01:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>CSS Lesson 7: Border Radius and Opacity</title>
		<link>http://www.davepcguy.com/archive/css-lesson-7-border-radius-and-opacity/</link>
		<comments>http://www.davepcguy.com/archive/css-lesson-7-border-radius-and-opacity/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 21:46:02 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.davepcguy.com/?p=891</guid>
		<description><![CDATA[Border Radius and Opacity I&#8217;ve noticed some hundred tweets on CSS3, every day. Check out the CSS3 Watcher for random updates. They actually mention really awesome and useful tutorials. So now, let&#8217;s look at some basic features that actually work cross-browser (with some tweaks). You can check some of the usage on two version of]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-7-border-radius-and-opacity%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=clrkmck&amp;style=normal&amp;service_api=clrkmck%3AR_a73f58a91ed3515157df75ab6c37730f&amp;hashtags=background,css,lesson,text,website&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<div style="border: 1px solid black; border-radius: 15px; -moz-border-radius: 15px;-webkit-border-radius: 15px; text-align: center; background-color: #0066CC; color: black; padding-bottom: 15px ">
<h1>Border Radius and <span style="opacity: 0.6;filter:alpha(opacity=60); background-color: white; padding: 10px; border-radius: 15px; -moz-border-radius: 15px;-webkit-border-radius: 15px;  "> Opacity</span></h1>
</div>
<p>I&#8217;ve noticed some hundred tweets on CSS3, every day. Check out the<a title="CSS3 Watcher twitter profile" href="http://twitter.com/css3watcher"> CSS3 Watcher </a>for random updates. They actually mention really awesome and useful tutorials. So now, let&#8217;s look at some basic features that actually work cross-browser (with some tweaks). You can check some of the usage on two version of one of my projects: the <a title="alpha age tester" href="http://test.davepcguy.com/scripts/agetester/index.php">alpha</a>, which utilizes rounded corners, and the<a title="beta age tester" href="http://test.davepcguy.com/scripts/agetester/final.php"> beta</a>, which utilizes a lot of opacity features.</p>
<p>I&#8217;ll show you some fun features as well as ways to get around them.<br />
<span id="more-891"></span></p>
<h1>Rounded Corners</h1>
<p>Creating rounded corners has always been a challenge. People have used several methods to accomplish this. One was by creating corner images to over-lap the background and make the square part of the corner transparent. I won&#8217;t explain that method, I don&#8217;t use it. But let&#8217;s look at the CSS3 write up:</p>
<pre class="brush: css; title: ;">
border-radius: 15px;
  -moz-border-radius: 15px;
  -webkit-border-radius: 15px;
</pre>
<p>The short-hand property works very well here. It&#8217;s explained in my <a title="lesson 2 fonts padding and border" href="http://www.davepcguy.com/archive/css-lesson-2-fonts-padding-and-border/">CSS Lesson 2</a>. But let&#8217;s go over this in detail:</p>
<p><strong>border-radius</strong> is the proper property mark-up in CSS3. There are variations to accommodate each corner of the object:</p>
<blockquote><p>border-top-right-radius:<br />
border-top-left-radius:<br />
border-bottom-right-radius:<br />
border-bottom-left-radius:</p></blockquote>
<p>There, you can specify the exact curvature of each corner. You can do that in pixels, em, and other such length measurements. The larger the measurement, the more curved the corner will be.<br />
Now, we all know that most browser today do not support pure CSS3 mark-up. There are two specific properties you can use.<br />
For Mozilla, use these:</p>
<blockquote><p>-moz-border-radius:<br />
-moz-border-topleft:<br />
-moz-border-topright:<br />
-moz-border-bottomleft:<br />
-moz-border-bottomright:</p></blockquote>
<p>Yay! These work just as well and the same way as the original CSS3 markup.<br />
For Safari and Chrome, use the following properties:</p>
<blockquote><p>-webkit-border-radius:<br />
-webkit-border-top-left-radius:<br />
-webkit-border-top-right-radius:<br />
-webkit-border-bottom-left-radius:<br />
-webkit-border-bottom-right-radius:</p></blockquote>
<p>But that&#8217;s about it. Unfortunately, none of these apply to Internet Explorer, (as was expected), so when you view my testing sites (links are at the beginning of this article), you won&#8217;t see anything different.</p>
<div id="attachment_895" class="wp-caption aligncenter" style="width: 234px"><a href="http://www.davepcguy.com/wp-content/uploads/2009/11/css1.png"><img class="size-full wp-image-895" title="Input box" src="http://www.davepcguy.com/wp-content/uploads/2009/11/css1.png" alt="Input box" width="224" height="66" /></a><p class="wp-caption-text">Input box</p></div>
<p>Here&#8217;s an input box modified by CSS3. Now to get the input box to look like this is a real problem without CSS but let me show you how you can bypass this CSS method on normal fields of text and html. Let me show you what I mean.<br />
</p>
<h2>The &#8220;Div&#8221; Method</h2>
<div id="attachment_896" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.davepcguy.com/wp-content/uploads/2009/11/css2.png"><img class="size-medium wp-image-896" title="template diagram" src="http://www.davepcguy.com/wp-content/uploads/2009/11/css2-300x251.png" alt="template diagram" width="300" height="251" /></a><p class="wp-caption-text">template diagram</p></div>
<p>Here&#8217;s a simple template diagram. The code for this would be as following:</p>
<pre class="brush: xml; title: ;">
&lt;div id=&quot;container&quot;&gt;
   &lt;div id=&quot;topcontent&quot;&gt;&lt;/div&gt;
   &lt;div id=&quot;content&quot;&gt;
       &lt;div id=&quot;clear&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
   &lt;div id=&quot;rightbar&quot;&gt;
       &lt;div id=&quot;clear&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
   &lt;div id=&quot;bottomcontent&quot;&gt;
   &lt;/div&gt;
&lt;/div&gt;
</pre>
<p>Read my <a title="Intro to Divs" href="http://www.davepcguy.com/archive/css-lesson-6-intro-to-divs/">intro to divs</a> to understand this structure better. But first, let me show you what I&#8217;m up to. Now, we know that most internet browsers these days support .PNG files, right? and .PNG files support transparency, yay! Instead of creating a mega background as I did in the case of one of my <a title="A Night Story" href="http://test.davepcguy.com/livestory/walkingman.html">websites</a>, we can simply take the top snippet of the background. Let me show you:</p>
<div id="attachment_897" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.davepcguy.com/wp-content/uploads/2009/11/css3.png"><img class="size-medium wp-image-897" title="background diagram" src="http://www.davepcguy.com/wp-content/uploads/2009/11/css3-300x243.png" alt="background diagram" width="300" height="243" /></a><p class="wp-caption-text">background diagram</p></div>
<p>You simply crop out the bottom and top into separate files. Make them as small as possible (height wise), let&#8217;s say ten pixels at most. Save them and insert them into the divs like this:</p>
<pre class="brush: css; title: ;">
#topcontent {
height: 10px;
background: url(top.png);
width: 100%;
}
</pre>
<p>Do the same for the bottom content and you&#8217;re done! It&#8217;s really this easy and it saves a lot of space. You may have to create another div just for the content and right sidebar, but that all depends on what you&#8217;re doing with the site.<br />
 <img src='http://www.davepcguy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I hope that helped! Let&#8217;s move on to opacity!</p>
<h1>Opacity</h1>
<p>Opacity, yay! Or as you could call it, transparency. It&#8217;s a great CSS3 feature that I absolutely love because there is so much you can do with it. For me, it&#8217;s a great design feature because now, I don&#8217;t have to mess with new images. (I&#8217;ll show you the image method afterward). So let&#8217;s go for it. Here is the basic mark-up:</p>
<pre class="brush: css; title: ;">
/* IE */
  filter:alpha(opacity=80);
/* CSS3 standard */
  opacity:0.8;
</pre>
<p>The CSS3 standard works on all browsers besides IE, which, luckily, has a simple work-around. The CSS3 standard works on the principle where &#8220;1&#8243; is completely visible and &#8220;0&#8243; is completely invisible. Anything in between is the opacity setting. The IE standard, works the same way except this time &#8220;100&#8243; is the full opacity and &#8220;0&#8243; is the complete transparency.<br />
Unfortunately, this property has limitations. If used on my standard Div model, on the &#8220;container&#8221;, then not only will the background have a set transparency, but everything within the container will as well, including text, images, and everything else. I&#8217;ve tried to use the &#8220;!important&#8221; mark-up but that does not work either. Also, when another transparency is set, for example, a transparent &#8220;content&#8221; div, it will only subtract from the &#8220;container&#8221; transparency. Thus, when the &#8220;container&#8221; is set to 80 in IE, and .8 in standard, then the &#8220;content&#8221; will start with an 80/.8 transparency. So when you set a transparency of 80/.8 to the &#8220;content&#8221; it will be 80% of the original 80%. I know, confusing, but it makes sense in the end <img src='http://www.davepcguy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h1>Image Method</h1>
<p>Okay, so let&#8217;s say you don&#8217;t want to put with this CSS3 crap, or you want only the background to be transparent. The method is simpler than you think. Create a 1 pixel x 1 pixel .PNG image, whatever color you want it, and set the transparency in the image, and save it. Then use this piece of CSS:</p>
<pre class="brush: css; title: ;">
#container {
background: url (transparentimage.png) repeat;
}
</pre>
<p>The image will repeat indefinitely and create a transparent background. If you have an actual picture as a background, set the transparency same way.</p>
<p>So, this was it! I hope you enjoyed my tutorial. Spread the word ^.^<br />
</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-7-border-radius-and-opacity%2F&amp;partner=sociable" title="Print"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-7-border-radius-and-opacity%2F&amp;title=CSS%20Lesson%207%3A%20Border%20Radius%20and%20Opacity&amp;bodytext=%0D%0ABorder%20Radius%20and%20%20Opacity%0D%0A%0D%0AI%27ve%20noticed%20some%20hundred%20tweets%20on%20CSS3%2C%20every%20day.%20Check%20out%20the%20CSS3%20Watcher%20for%20random%20updates.%20They%20actually%20mention%20really%20awesome%20and%20useful%20tutorials.%20So%20now%2C%20let%27s%20look%20at%20some%20basic%20features%20that%20actually%20wor" title="Digg"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-7-border-radius-and-opacity%2F&amp;title=CSS%20Lesson%207%3A%20Border%20Radius%20and%20Opacity&amp;notes=%0D%0ABorder%20Radius%20and%20%20Opacity%0D%0A%0D%0AI%27ve%20noticed%20some%20hundred%20tweets%20on%20CSS3%2C%20every%20day.%20Check%20out%20the%20CSS3%20Watcher%20for%20random%20updates.%20They%20actually%20mention%20really%20awesome%20and%20useful%20tutorials.%20So%20now%2C%20let%27s%20look%20at%20some%20basic%20features%20that%20actually%20wor" title="del.icio.us"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-7-border-radius-and-opacity%2F&amp;t=CSS%20Lesson%207%3A%20Border%20Radius%20and%20Opacity" title="Facebook"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-7-border-radius-and-opacity%2F&amp;title=CSS%20Lesson%207%3A%20Border%20Radius%20and%20Opacity&amp;annotation=%0D%0ABorder%20Radius%20and%20%20Opacity%0D%0A%0D%0AI%27ve%20noticed%20some%20hundred%20tweets%20on%20CSS3%2C%20every%20day.%20Check%20out%20the%20CSS3%20Watcher%20for%20random%20updates.%20They%20actually%20mention%20really%20awesome%20and%20useful%20tutorials.%20So%20now%2C%20let%27s%20look%20at%20some%20basic%20features%20that%20actually%20wor" title="Google Bookmarks"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-7-border-radius-and-opacity%2F&amp;title=CSS%20Lesson%207%3A%20Border%20Radius%20and%20Opacity&amp;source=Dave+PC+Guy+Computers+and+Technology&amp;summary=%0D%0ABorder%20Radius%20and%20%20Opacity%0D%0A%0D%0AI%27ve%20noticed%20some%20hundred%20tweets%20on%20CSS3%2C%20every%20day.%20Check%20out%20the%20CSS3%20Watcher%20for%20random%20updates.%20They%20actually%20mention%20really%20awesome%20and%20useful%20tutorials.%20So%20now%2C%20let%27s%20look%20at%20some%20basic%20features%20that%20actually%20wor" title="LinkedIn"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-7-border-radius-and-opacity%2F&amp;title=CSS%20Lesson%207%3A%20Border%20Radius%20and%20Opacity" title="Reddit"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-7-border-radius-and-opacity%2F&amp;t=CSS%20Lesson%207%3A%20Border%20Radius%20and%20Opacity&amp;s=%0D%0ABorder%20Radius%20and%20%20Opacity%0D%0A%0D%0AI%27ve%20noticed%20some%20hundred%20tweets%20on%20CSS3%2C%20every%20day.%20Check%20out%20the%20CSS3%20Watcher%20for%20random%20updates.%20They%20actually%20mention%20really%20awesome%20and%20useful%20tutorials.%20So%20now%2C%20let%27s%20look%20at%20some%20basic%20features%20that%20actually%20wor" title="Tumblr"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=CSS%20Lesson%207%3A%20Border%20Radius%20and%20Opacity%20-%20http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-7-border-radius-and-opacity%2F" title="Twitter"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=CSS%20Lesson%207%3A%20Border%20Radius%20and%20Opacity&amp;body=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-7-border-radius-and-opacity%2F" title="email"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=CSS%20Lesson%207%3A%20Border%20Radius%20and%20Opacity&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-7-border-radius-and-opacity%2F" title="Slashdot"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-7-border-radius-and-opacity%2F&amp;title=CSS%20Lesson%207%3A%20Border%20Radius%20and%20Opacity" title="StumbleUpon"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.davepcguy.com/archive/css-lesson-7-border-radius-and-opacity/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>CSS: Lesson 2 Fonts, Padding, and Border</title>
		<link>http://www.davepcguy.com/archive/css-lesson-2-fonts-padding-and-border/</link>
		<comments>http://www.davepcguy.com/archive/css-lesson-2-fonts-padding-and-border/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 21:23:46 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[formatting]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[webpage]]></category>

		<guid isPermaLink="false">http://www.davepcguy.com/?p=346</guid>
		<description><![CDATA[CSS Lesson 2 In lesson 1, I talked about backgrounds and text. Let&#8217;s move on, I&#8217;ll start out by expanding on the text manipulation with fonts and continue by the introduction of  what I call &#8220;general formatting.&#8221; General formatting includes the definition of padding, borders, margins, and outlines. At the end of the lesson, you]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-2-fonts-padding-and-border%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=clrkmck&amp;style=normal&amp;service_api=clrkmck%3AR_a73f58a91ed3515157df75ab6c37730f&amp;hashtags=background,css,fonts,formatting,lesson,text,webpage&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<h1 style="font-size: 30px; font-weight: bolder; text-align: center; padding: 10px; background: grey; color: white; border: thick outset grey; text-shadow:0px 1.4px 3px black">CSS Lesson 2</h1>
<p>In <a href="http://www.davepcguy.com/archive/css-lesson-1/">lesson 1</a>, I talked about backgrounds and text. Let&#8217;s move on, I&#8217;ll start out by expanding on the text manipulation with fonts and continue by the introduction of  what I call &#8220;general formatting.&#8221; General formatting includes the definition of padding, borders, margins, and outlines. At the end of the lesson, you should know how to create the above banner and more<span id="more-346"></span></p>
<p>Here&#8217;s an overview of what you&#8217;ll learn in this lesson:</p>
<ul>
<li><a href="#fonts">Fonts</a></li>
<li><a href="#padding">Padding</a></li>
<li><a href="#border">Border</a></li>
</ul>
<h1><strong><a name="fonts">Fonts </a></strong></h1>
<p>We&#8217;ve already learned that there are multiple ways to manipulate the text in your HTML document through CSS. You can add text-decoration, align the text (text-align), change the line-height, word-spacing, and a lot of other stuff. Now let&#8217;s look at the font.</p>
<p>The general idea with Fonts is to use CSS to specify a group of fonts you&#8217;d like to use in HTML. If the browser does not support the first font, it will fall back on the next available font, and so on. There are three different general groups of fonts. There is &#8220;Serif&#8221;, &#8220;Sans-Serif&#8221;, and &#8220;Mono-Space&#8221;. Serif is the group of fonts with those little lines at the end of characters. Here is how you write it:</p>
<blockquote><p>p.sans {font-family:Arial, Helvetica, sans-serif}</p>
<p style="font-family: Arial, Helvetica, sans-serif">Sans-serif</p>
<p>p.serif {font-family:&#8221;Times New Roman&#8221;, Times, serif}</p>
<p style="font-family: Times, Serif">Serif</p>
<p>p.monospace {font-family:&#8221;Courier New&#8221;, Courier, monospace}</p>
<p style="font-family: Courier, monospace">monospace</p>
</blockquote>
<p>Let&#8217;s continue. When you use fonts that have multiple words, use quotations as shown above. You can mix and match different fonts but try to stick to fonts that look similar. Here are some basic properties:</p>
<blockquote><p>&lt;p style=&#8221;font-size: 1.5em; font-variant: small-caps; font-weight: 200&#8243;&gt;</p>
<p><span style="font-size: 1.5em; font-variant: small caps; font-weight: 200">hello</span></p>
<p>&lt;/p&gt;</p></blockquote>
<p><strong>Font-size</strong> is self-explanatory, you can use &#8220;pt&#8221; for points, &#8220;px&#8221; for pixels, percent, and &#8220;em&#8221; which is a CSS unit of measurement, usually equaled to about 16px. It&#8217;s a unit of measurement that depends on the browser, the default browser size would be 1em, so if you want one and a half that size you&#8217;d use 1.5em. <strong>Font-variant</strong> only controls if the text has &#8220;small caps&#8221; or if it&#8217;s going to be &#8220;normal&#8221;. <strong>Font-weight</strong> specifies the font weight, obviously, or the boldness of the font. You can use values such as &#8220;bold, &#8220;bolder&#8221;, &#8220;lighter&#8221;, &#8220;normal&#8221;, and then go by &#8220;100&#8243;, &#8220;200&#8243; etc.</p>
<p>Let&#8217;s look at <strong>Font-style</strong>. Font-style has the values &#8220;normal&#8221;, &#8220;italic&#8221;, and &#8220;oblique&#8221; (don&#8217;t use this one).</p>
<p>Finally, let&#8217;s look at <strong>Font</strong> itself, under the property font, you can declare all the different values at once.</p>
<blockquote><p>body { font: bolder small-caps italic 2.4em/3em Arial, Helvetica, Sans-serif }<br />
<span style="font: bolder small-caps italic 2.4em/3em Arial, Helvetica, Sans-serif ">This is the modified text </span></p></blockquote>
<p>As you can see, you can modify a lot using just the &#8220;font&#8221; property. There are some additional font values such as &#8220;caption&#8221;, &#8220;icon&#8221;, &#8220;status-bar&#8221;, &#8220;small-caption&#8221;, &#8220;message-box&#8221;, and &#8220;menu&#8221;. All of these modify the font to correspond with the font usage. &#8220;Message-box&#8221; for example, uses the font that&#8217;s used by form/dialog boxes. &#8220;Caption&#8221; is used by buttons, drop down menus etc.</p>
<h1><strong><a name="padding">Padding </a></strong></h1>
<p>For every content area, like a box, there are four different sections. There is the content, the padding, the border, and margin in that order from the middle to the outside of the box. We&#8217;ll start with padding first, which is the area directly around the content. It &#8220;clears&#8221; the area around the content, let&#8217;s say text, for the background and under elements.</p>
<p>Let&#8217;s try to define some padding:</p>
<blockquote><p>&lt;p style=&#8221;padding-top: 10px; padding-bottom: 10px; padding-left: 15px; padding-right: 15px; background: black; color: white&#8221;&gt;</p>
<p style="padding-top: 10px; padding-bottom: 10px; padding-left: 15px; padding-right: 5px; background: black; color: white">Padded text</p>
</blockquote>
<p>Well that didn&#8217;t work out as I planned, it seems as if WordPress has its own formatting that I cannot bypass. <a href="http://www.w3schools.com/css/tryit.asp?filename=trycss_padding_sides">Here</a> is a better example you can play around with by <a href="http://www.w3schools.com">W3Schools</a>. Let&#8217;s learn the short-hand. To express the above, you could have written it as the following:</p>
<blockquote><p>&lt;p style=&#8221;padding: 10px 10px 15px 15px&#8221;&gt;</p>
<p>or</p>
<p>&lt;p style=&#8221;padding: 10px 15px&#8221;&gt;</p></blockquote>
<p>You have to express all the values otherwise, your CSS will be interpreted wrongly. Let&#8217;s say you have four different values:</p>
<blockquote><p>a, b, c, and d</p></blockquote>
<p>where a is the top, b is the right, c is the bottom, and d is the left (clockwise):</p>
<blockquote><p>padding: a b c d</p></blockquote>
<p>Let&#8217;s say &#8220;b&#8221; and &#8220;d&#8221; are equal:</p>
<blockquote><p>padding: a bd c</p></blockquote>
<p>&#8220;bd&#8221; would be a single value. In this example, the following is short-hand: &#8220;top&#8221;, &#8220;left and right&#8221;, &#8220;bottom&#8221;. If you input only two values such as &#8220;ac bd&#8221; then it&#8217;s: &#8220;top and bottom&#8221;, &#8220;left and right&#8221;. A single value &#8220;abcd&#8221; would apply to all padding. Oh and when I say &#8220;abcd&#8221;, I don&#8217;t mean the multiplication but rather that it applies to all values. For example, if a=15px, and so does b, c, and d. You&#8217;d have to only write:</p>
<blockquote><p>padding: 15px</p></blockquote>
<p>You can use any other lenght-specifying measurements such as em and %.</p>
<h1><strong><a name="border">Border </a></strong></h1>
<p>Let&#8217;s look at Borders, the next area around content. We specified the padding already which is affected by the background element of the content area. The border can have its own style and its own background and color.</p>
<p>Let&#8217;s start with <strong>border-style: </strong></p>
<blockquote><p>p.bordernone {border-style: none}</p>
<p><span style="border-style:dotted">p.borderdotted {border-style: dotted}</span></p>
<p><span style="border-style: solid">p.bordersolid {border-style: solid} </span></p>
<p><span style="border-style: double">p.borderdouble {border-style: double} </span></p>
<p><span style="border-style: groove"> p.bordergroove {border-style:groove}</span></p>
<p><span style="border-style: ridge">p.borderridge {border-style: ridge}</span></p>
<p><span style="border-style:inset">p.borderinset {border-style: inset} </span></p>
<p><span style="border-style: outset">p.borderoutset {border-style: outset} </span></p>
<p><span style="border-style: hidden">p.borderhidden {border-style: hidden} </span></p></blockquote>
<p>These are all the borders available for your own use. As you can see, I coded the code so that the code itself is an example. If you want to use the above for your own purposes, look in the source and type in &#8220;border-style&#8221; into the search bar. You can change the width of the border line with<strong> border-width</strong>. Which, in addition to normal measurements, also accepts the values &#8220;thin&#8221;, &#8220;medium&#8221;, and &#8220;thick&#8221;. Another property you can define is <strong>border-color</strong>.</p>
<p>Now, let&#8217;s say you want the width, color, AND the style different for each side of the border? Here&#8217;s how you do it:</p>
<blockquote><p>p.complicatedborder {</p>
<p>border-top-style: solid;</p>
<p>border-top-width: 5px;</p>
<p>border-top-color: black;</p>
<p>border-right-style: dotted;</p>
<p>border-right-width: 10px;</p>
<p>border-right-color: white;</p>
<p>etc&#8230;.</p>
<p>}</p></blockquote>
<p>I&#8217;m not going to write it all out, but you get the idea. Where it says &#8220;top&#8221; or &#8220;right&#8221;, substitute it with &#8220;bottom&#8221; or &#8220;left&#8221; and you can apply it to the bottom or left sides. It works the same for all of the sides. Here&#8217;s the short-hand:</p>
<blockquote><p>p.lesscomplicatedborder{</p>
<p>border-left: 15px groove blue;</p>
<p>border-bottom: 7px double red;</p>
<p>}</p></blockquote>
<p>The shorthand is used the following way: &#8220;border-(side): width style color;&#8221; You can use this method on all sides by declaring &#8220;border: width style color&#8221; and not including the side tidbit. One last thing, let&#8217;s say you need to only define the border styles but are too lazy and will instead resort to shorthand?</p>
<blockquote><p>p.borderstyles {</p>
<p>border: dotted solid hidden inset;</p>
<p>}</p></blockquote>
<p>This part works the same as the shorthand for padding. If you have four values they&#8217;ll apply to : top right bottom left, respectively. Three values: top right/left bottom. Two values: top/bottom left/right. One value: top/bottom/left/right.<br />
That&#8217;s it! In my next tutorial, I&#8217;ll address outlines and margins.</p>
<p>As always, here is the code for the header:</p>
<blockquote><p>&lt;h1 style=&#8221;font-size: 30px; font-weight: bolder; text-align: center; padding: 10px; background: grey; color: white; border: thick outset grey; text-shadow:0px 1.4px 3px black&#8221;&gt;CSS Lesson 2&lt;/h1&gt;</p></blockquote>




Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-2-fonts-padding-and-border%2F&amp;partner=sociable" title="Print"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-2-fonts-padding-and-border%2F&amp;title=CSS%3A%20Lesson%202%20Fonts%2C%20Padding%2C%20and%20Border&amp;bodytext=CSS%20Lesson%202%0D%0AIn%20lesson%201%2C%20I%20talked%20about%20backgrounds%20and%20text.%20Let%27s%20move%20on%2C%20I%27ll%20start%20out%20by%20expanding%20on%20the%20text%20manipulation%20with%20fonts%20and%20continue%20by%20the%20introduction%20of%C2%A0%20what%20I%20call%20%22general%20formatting.%22%20General%20formatting%20includes%20the%20def" title="Digg"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-2-fonts-padding-and-border%2F&amp;title=CSS%3A%20Lesson%202%20Fonts%2C%20Padding%2C%20and%20Border&amp;notes=CSS%20Lesson%202%0D%0AIn%20lesson%201%2C%20I%20talked%20about%20backgrounds%20and%20text.%20Let%27s%20move%20on%2C%20I%27ll%20start%20out%20by%20expanding%20on%20the%20text%20manipulation%20with%20fonts%20and%20continue%20by%20the%20introduction%20of%C2%A0%20what%20I%20call%20%22general%20formatting.%22%20General%20formatting%20includes%20the%20def" title="del.icio.us"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-2-fonts-padding-and-border%2F&amp;t=CSS%3A%20Lesson%202%20Fonts%2C%20Padding%2C%20and%20Border" title="Facebook"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-2-fonts-padding-and-border%2F&amp;title=CSS%3A%20Lesson%202%20Fonts%2C%20Padding%2C%20and%20Border&amp;annotation=CSS%20Lesson%202%0D%0AIn%20lesson%201%2C%20I%20talked%20about%20backgrounds%20and%20text.%20Let%27s%20move%20on%2C%20I%27ll%20start%20out%20by%20expanding%20on%20the%20text%20manipulation%20with%20fonts%20and%20continue%20by%20the%20introduction%20of%C2%A0%20what%20I%20call%20%22general%20formatting.%22%20General%20formatting%20includes%20the%20def" title="Google Bookmarks"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-2-fonts-padding-and-border%2F&amp;title=CSS%3A%20Lesson%202%20Fonts%2C%20Padding%2C%20and%20Border&amp;source=Dave+PC+Guy+Computers+and+Technology&amp;summary=CSS%20Lesson%202%0D%0AIn%20lesson%201%2C%20I%20talked%20about%20backgrounds%20and%20text.%20Let%27s%20move%20on%2C%20I%27ll%20start%20out%20by%20expanding%20on%20the%20text%20manipulation%20with%20fonts%20and%20continue%20by%20the%20introduction%20of%C2%A0%20what%20I%20call%20%22general%20formatting.%22%20General%20formatting%20includes%20the%20def" title="LinkedIn"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-2-fonts-padding-and-border%2F&amp;title=CSS%3A%20Lesson%202%20Fonts%2C%20Padding%2C%20and%20Border" title="Reddit"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-2-fonts-padding-and-border%2F&amp;t=CSS%3A%20Lesson%202%20Fonts%2C%20Padding%2C%20and%20Border&amp;s=CSS%20Lesson%202%0D%0AIn%20lesson%201%2C%20I%20talked%20about%20backgrounds%20and%20text.%20Let%27s%20move%20on%2C%20I%27ll%20start%20out%20by%20expanding%20on%20the%20text%20manipulation%20with%20fonts%20and%20continue%20by%20the%20introduction%20of%C2%A0%20what%20I%20call%20%22general%20formatting.%22%20General%20formatting%20includes%20the%20def" title="Tumblr"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=CSS%3A%20Lesson%202%20Fonts%2C%20Padding%2C%20and%20Border%20-%20http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-2-fonts-padding-and-border%2F" title="Twitter"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=CSS%3A%20Lesson%202%20Fonts%2C%20Padding%2C%20and%20Border&amp;body=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-2-fonts-padding-and-border%2F" title="email"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=CSS%3A%20Lesson%202%20Fonts%2C%20Padding%2C%20and%20Border&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-2-fonts-padding-and-border%2F" title="Slashdot"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-2-fonts-padding-and-border%2F&amp;title=CSS%3A%20Lesson%202%20Fonts%2C%20Padding%2C%20and%20Border" title="StumbleUpon"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.davepcguy.com/archive/css-lesson-2-fonts-padding-and-border/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>CSS: Lesson 1</title>
		<link>http://www.davepcguy.com/archive/css-lesson-1/</link>
		<comments>http://www.davepcguy.com/archive/css-lesson-1/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 18:32:35 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[dreamweaver]]></category>
		<category><![CDATA[formatting]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://www.davepcguy.com/?p=306</guid>
		<description><![CDATA[A tutorial on text and background manipulation using CSS: cascading style sheets. Also included is a short introduction to using DreamWeaver as your CSS editor. Most properties and values usable for the two main topics are included!]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-1%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=clrkmck&amp;style=normal&amp;service_api=clrkmck%3AR_a73f58a91ed3515157df75ab6c37730f&amp;hashtags=background,css,dreamweaver,formatting,text&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<h1 style="text-align:center; text-shadow: 0px .5px 2px black; color: black; font-size: 26pt; text-decoration:underline; letter-spacing:14px;">CSS Lesson1</h1>
<hr />CSS is a lot of fun once you start it, the same way PHP is a lot of fun. So here&#8217;s what I&#8217;ve learned so far.</p>
<ol>
<li><a href="#implement">Ways to implement CSS</a></li>
<li><a href="#dreamweaver">CSS in DreamWeaver</a></li>
<li><a href="#bgr">Backgrounds in CSS</a></li>
<li><a href="#text">Text in CSS </a></li>
</ol>
<p><span id="more-306"></span></p>
<p><strong><br />
</strong></p>
<p><a name="implement"><strong>Ways to implement CSS</strong><br />
</a><br />
There are three different ways to use styles:</p>
<ol>
<li>Using an <strong>External Style Sheet</strong>: You do this by creating a .css file. This file has the lowest priority when it comes to style use UNLESS you reference it in the &lt;head&gt; AFTER you use the internal style sheets. You can reference the file this way: &lt;link href=&#8221;style.css&#8221; rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; /&gt;</li>
<li><strong>Internal Style Sheet </strong>is another method of using styles. This style will only apply to the html document it&#8217;s in. It has the second highest priority but only when the external style sheet is referenced before it. This style sheet is in the &lt;head&gt; tag and you can use it by defining styles between these two tags: &lt;style type=&#8221;text/css&#8221;&gt; &lt;/style&gt;</li>
<li><strong>In-line Styles</strong> are of the highest priority and will override any other styles.  Here&#8217;s an example: &lt;p style=&#8221;color: #000000&#8243;&gt;.</li>
</ol>
<p><a name="dreamweaver"><strong>CSS in DreamWeaver</strong></a></p>
<p>CSS is made unbelievably easy in DreamWeaver. Once you start typing something about a style, let&#8217;s say you type &lt;style type=&#8221;text/css&#8221;&gt; and you type &#8220;p { text&#8221;, you&#8217;ll get a list of properties to choose from:</p>
<p><a href="http://www.davepcguy.com/wp-content/uploads/2009/09/option.jpg"><img class="aligncenter size-full wp-image-307" title="option" src="http://www.davepcguy.com/wp-content/uploads/2009/09/option.jpg" alt="option" width="196" height="173" /></a>Once you hit enter, you&#8217;ll be presented with another set of options for the value of the property:</p>
<p><a href="http://www.davepcguy.com/wp-content/uploads/2009/09/option2.jpg"><img class="aligncenter size-full wp-image-308" title="option2" src="http://www.davepcguy.com/wp-content/uploads/2009/09/option2.jpg" alt="option2" width="206" height="110" /></a><a href="http://www.davepcguy.com/wp-content/uploads/2009/09/dock.jpg"><img class="size-medium wp-image-309 alignleft" title="dock" src="http://www.davepcguy.com/wp-content/uploads/2009/09/dock-196x300.jpg" alt="dock" width="196" height="300" /></a>You&#8217;ve also the option to use the CSS dock on the right. If you can&#8217;t see it, go to Window&gt;&gt;CSS Styles and the dock should appear. As you can see, I already have a couple styles defined in my document: &lt;p&gt; and &lt;body&gt;. I&#8217;ve selected &#8220;p&#8221; and you can see that there is one property defined and that is &#8220;color&#8221; and that color is white.  If you selected the &lt;body&gt; tag, you&#8217;d see something similar. You can add properties with the &#8220;Add Property&#8221; button which will bring up a list of properties and then a list of values as above.</p>
<p>The three buttons on the bottom left will let you change the view of the properties:</p>
<p>1. <strong>Category view </strong>will show you all the available properties in different categories with values (if any) in the right column</p>
<p>2. <strong>Alphabetical view </strong>serves to show you the list of available properties in an alphabetical order</p>
<p>3. <strong>Set Property view</strong> is the view that I have set in the picture.</p>
<p>The bottom right icons are all self-explanatory if you just hover over them. The first let&#8217;s you add a style sheet that will show up on top (see that style.css with a plus next to it?), the second button is for a new CSS rule, the third is to edit style and the fourth button erases a style.</p>
<p><a name="bgr"><strong>Backgrounds in CSS</strong></a></p>
<p>Let&#8217;s get started with some properties. Traditionally, you could use &lt;body bgcolor=&#8221;white&#8221;&gt; or &lt;body background=&#8221;image.jpg&#8221;&gt; for the background but you can also use CSS for this and not only that, but you can define a background color or a background image for &lt;h1&gt; tags and for &lt;p&gt; tags:</p>
<blockquote><p>body { background-image: url(&#8216;link.jpg&#8217;)}</p>
<p>p { background-color: white}</p></blockquote>
<p>Instead of the word &#8220;white, <strong>color</strong> can also be specified using the hex designated value: #FFFFFF or the RGB color: rgb(0,0,0). Here are three more background properties that are quite interesting:</p>
<blockquote><p>body {</p>
<p>background-position: bottom;</p>
<p>background-repeat: repeat-x;</p>
<p>background-attachment: scroll;</p>
<p>}</p></blockquote>
<p>The first property can be set for any given position (left, right, top etc) and supports more complicated positions (top left, top right), you can even use pixels (10px 34px) and percent (32% 23%). Repeat can have the following values: repeat-x, repeat-y, repeat, and no-repeat. Repeat-x repeats horizontally while repeat-y repeats vertically. &#8220;Repeat&#8221; will repeat the image non-stop in every way while &#8220;no-repeat&#8221; will keep the image from repeating ever. For the last property has two values: fixed or scroll. &#8220;Fixed&#8221; will keep the background moving as you scroll, ie the image will seem to scroll down with you. &#8220;Scroll&#8221; will keep the image where it is so that when you&#8217;re scrolling down, you&#8217;re scrolling down the image as well. It&#8217;s hard to explain so let me show you an example, go to my <a title="WAJANUS twitter" href="http://twitter.com/wajanusdesigns" target="_blank">twitter page</a> and try scrolling down. That&#8217;s &#8220;fixed&#8221; attachment.</p>
<p><a name="text"><strong>Text in CSS</strong></a></p>
<p>There are many properties you can assign to the text in many different ways. Text can be defined under the &lt;body&gt; tag, the &lt;h#&gt; tag (# = 1, 2, 3 etc), the &lt;p&gt; tag, and others. Let&#8217;s start with text-alignment. I&#8217;ll use the class system which works like this:</p>
<blockquote><p>p.nameofclass {text-align: justify}</p>
<p>&lt;p class=&#8221;nameofclass&#8221;&gt; hello &lt;/p&gt;</p></blockquote>
<p>In this example, the class name &#8220;nameofclass&#8221; can only be used with the &lt;p&gt; tag. The <strong>text-align</strong>: justify will tell the browser to space out the letters and the words to fill up the entire line, much like in magazines. Other text-align attributes:</p>
<blockquote><p>p.left {text-align: left}</p>
<p>p.right {text-align: right}</p>
<p>p.center {text-align:center}</p></blockquote>
<p>You can align the text: left, right, or at the center as well. The class names are not mandatory. Next, let&#8217;s do <strong>text-decoration</strong>.</p>
<blockquote><p>h1.strikethrough {text-decoration: line-through}</p>
<p>h2.lineabove {text-decoration: overline}</p>
<p>h3.lineunder {text-decoration: underline}</p></blockquote>
<p>There is also another decoration called &#8220;<strong>blink</strong>&#8221; but it&#8217;s not supported in Chrome, IE, nor Safari. It makes the text blink in and out of existence.</p>
<p>There are actually a lot of different properties that are text-related. There is &#8220;<strong>color</strong>&#8220;, that&#8217;s self-explanatory. There is &#8220;<strong>line-height</strong>&#8221; which specifies the amount of space between consecutive lines. There is also &#8220;<strong>direction</strong>&#8221; with the values of either &#8220;ltr&#8221; or &#8220;rtl&#8221; which specifies if the text will go left to right or right to left. You can specify the amount of space between words with &#8220;<strong>word-spacing</strong>&#8221; with that comes &#8220;<strong>letter-spacing</strong>&#8221; with a similar function but this one defines space between letters.</p>
<p>Here is an interesting text property: text-shadow. Here is what you can define it as:</p>
<blockquote><p>h2.shadow {text-shadow: 2px 3px 4px white}</p>
<h2 style="text-shadow: 2px 3px 4px black; color: white">h2 example</h2>
</blockquote>
<p>As you can see, it&#8217;s quite a fun property. The values are pretty easy to define. The first <strong>&#8220;text-shadow&#8221;</strong> value is the x-coordinate offset, the second value is the y-coordinate offset, the third value is the amount of blur, and the fourth value is the color of the shadow.</p>
<p>You can also make a &#8220;<strong>text-indent</strong>&#8221; which will make an indent at the beginning of your paragraph. There is a neat property called &#8220;<strong>text-transform&#8221; </strong>which has the values: uppercase, lowercase, and capitalize. Self-explanatory, I think. It&#8217;ll make all of your text in uppercase, lower case, or it will capitalize everything in your text (or the specified class or tag). Finally, there is a &#8220;<strong>white-space</strong>&#8221; property that has the values: pre and nowrap. &#8220;Pre&#8221; will wrap your text according to how you have it in your code ie if you put a line break (not &lt;br&gt; but just pressed enter) in your code, it will show it. The default will read the whole paragraph and the browser will word-wrap it once the line reaches a certain limit (the end of the page or of its container). &#8220;Nowrap&#8221; will defy that wrapping and the text will go on and on in width.</p>
<p>I hope you enjoyed my tutorial, I&#8217;ll have more to come soon. Here is a tip: for most properties that require a number value (letter-spacing etc) you can use several methods to define the value. I like to use pixels, but you can usually also use % and other methods.</p>
<p>Oh and here&#8217;s the code for the CSS:Lesson1 header above:</p>
<blockquote><p>&lt;h1 style=&#8221;text-align:center; text-shadow: 0px .5px 2px black; color: black; font-size: 26pt; text-decoration:underline; letter-spacing:14px;&#8221;&gt;CSS Lesson1&lt;/h1&gt;</p></blockquote>
<p>When I figure out how to make the font less pixelated, I&#8217;ll tell you <img src='http://www.davepcguy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thank you for reading!<br />
</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-1%2F&amp;partner=sociable" title="Print"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-1%2F&amp;title=CSS%3A%20Lesson%201&amp;bodytext=A%20tutorial%20on%20text%20and%20background%20manipulation%20using%20CSS%3A%20cascading%20style%20sheets.%20Also%20included%20is%20a%20short%20introduction%20to%20using%20DreamWeaver%20as%20your%20CSS%20editor.%20Most%20properties%20and%20values%20usable%20for%20the%20two%20main%20topics%20are%20included%21" title="Digg"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-1%2F&amp;title=CSS%3A%20Lesson%201&amp;notes=A%20tutorial%20on%20text%20and%20background%20manipulation%20using%20CSS%3A%20cascading%20style%20sheets.%20Also%20included%20is%20a%20short%20introduction%20to%20using%20DreamWeaver%20as%20your%20CSS%20editor.%20Most%20properties%20and%20values%20usable%20for%20the%20two%20main%20topics%20are%20included%21" title="del.icio.us"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-1%2F&amp;t=CSS%3A%20Lesson%201" title="Facebook"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-1%2F&amp;title=CSS%3A%20Lesson%201&amp;annotation=A%20tutorial%20on%20text%20and%20background%20manipulation%20using%20CSS%3A%20cascading%20style%20sheets.%20Also%20included%20is%20a%20short%20introduction%20to%20using%20DreamWeaver%20as%20your%20CSS%20editor.%20Most%20properties%20and%20values%20usable%20for%20the%20two%20main%20topics%20are%20included%21" title="Google Bookmarks"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-1%2F&amp;title=CSS%3A%20Lesson%201&amp;source=Dave+PC+Guy+Computers+and+Technology&amp;summary=A%20tutorial%20on%20text%20and%20background%20manipulation%20using%20CSS%3A%20cascading%20style%20sheets.%20Also%20included%20is%20a%20short%20introduction%20to%20using%20DreamWeaver%20as%20your%20CSS%20editor.%20Most%20properties%20and%20values%20usable%20for%20the%20two%20main%20topics%20are%20included%21" title="LinkedIn"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-1%2F&amp;title=CSS%3A%20Lesson%201" title="Reddit"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-1%2F&amp;t=CSS%3A%20Lesson%201&amp;s=A%20tutorial%20on%20text%20and%20background%20manipulation%20using%20CSS%3A%20cascading%20style%20sheets.%20Also%20included%20is%20a%20short%20introduction%20to%20using%20DreamWeaver%20as%20your%20CSS%20editor.%20Most%20properties%20and%20values%20usable%20for%20the%20two%20main%20topics%20are%20included%21" title="Tumblr"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=CSS%3A%20Lesson%201%20-%20http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-1%2F" title="Twitter"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=CSS%3A%20Lesson%201&amp;body=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-1%2F" title="email"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=CSS%3A%20Lesson%201&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-1%2F" title="Slashdot"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-1%2F&amp;title=CSS%3A%20Lesson%201" title="StumbleUpon"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.davepcguy.com/archive/css-lesson-1/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

