<?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>DT Blog &#187; pseudo classes</title>
	<atom:link href="http://www.dreamtemplate.com/blog/tag/pseudo-classes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dreamtemplate.com/blog</link>
	<description>Web Design Tips, Tutorials &#38; More!</description>
	<lastBuildDate>Sat, 22 Oct 2011 12:45:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Pseudo-classes and Pseudo-elements in CSS</title>
		<link>http://www.dreamtemplate.com/blog/web-design-tips/pseudo-classes-and-pseudo-elements-in-css/</link>
		<comments>http://www.dreamtemplate.com/blog/web-design-tips/pseudo-classes-and-pseudo-elements-in-css/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 23:01:43 +0000</pubDate>
		<dc:creator>Richard Teahon</dc:creator>
				<category><![CDATA[Web Design Tips]]></category>
		<category><![CDATA[Web Design Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[pseudo classes]]></category>
		<category><![CDATA[pseudo-elements]]></category>

		<guid isPermaLink="false">http://www.dreamtemplate.com/blog/?p=70</guid>
		<description><![CDATA[As CSS gains in popularity for its numerous advantages in constructing layout, it is important that as a designer, you get your head around some of the fundamental elements of cascading style sheets.  Pseudo-classes and pseudo-elements, are necessary concepts to understand when developing a website, using CSS. The main reasons for this, is that pseudo-classes [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-62" src="http://www.dreamtemplate.com/blog/wp-content/uploads/2009/04/images6.jpg" alt="images6" width="145" height="101" />As CSS gains in popularity for its numerous advantages in constructing layout, it is important that as a designer, you get your head around some of the fundamental elements of cascading style sheets.  <strong>Pseudo-classes</strong> and <strong>pseudo-elements</strong>, are necessary concepts to understand when developing a website, using CSS.</p>
<p>The main reasons for this, is that <strong>pseudo-classes</strong> and <strong>pseudo-elements</strong>, provide the capability for manipulating text in a paragraph, and can do this to the individual letter.  This creates numerous possibilities for creativity in terms of style, feel, and appearance, as well as opening possibilities for better navigation in a website.<br />
CSS supporting browsers, automatically recognise the special “classes”, and “elements”, that are <strong>pseudo-classes</strong> and <strong>pseudo elements</strong>.  Incidentally, the browser recognition is not part of the markup language, but instead the responsibility of the browser to get to the elements.  In a nutshell, <strong>pseudo-elements</strong> refer to sub-parts of an element, such as the a particular letter in a paragraph, and, <strong>pseudo classes</strong>, distinguish different  types of elements.  An example here could be, active and visited links.(Both are two types of anchor links).</p>
<p><strong>Pseudo-elements</strong> and <strong>pseudo classes</strong> rules are shown below:</p>
<p> selector :pseudo-class {property:value}<br />
Or<br />
selector: pseudo-element {property :  value}</p>
<p><strong>Pseudo-elements</strong> and <strong>pseudo-classes</strong> do work with normal classes.  See below:</p>
<p> selector.class  :  pseudo-class { property : value }<br />
Or<br />
selector.class : pseudo-element {property : value}</p>
<p> <strong>Pseudo-elements</strong> and <strong>pseudo classes</strong>, should not be specified with HTML’s CLASS attribute.</p>
<p> Anchor <strong>Pseudo-classes</strong> can display certain types of links differently, when they are assigned to an element.  For the example below, we’ll call this element A.  The links they can effect are links, visited links, and active links.  These can be manipulated to be shown in a different color, font size, or style.<br />
One idea, is to display a selected or active link, in a different color and size.  This effect is cancelled, once the page is reloaded, as the color and font size returns to its original style.<br />
The resulting style sheet could look like this.<br />
A:link     {color:red}<br />
A:active  {color:blue; font-size:115%}<br />
A:visited {color:green; font-size:80%}</p>
<p>CSS1 has the capability to display, and manipulate text, as pioneered in publications such as the Wall Street Journal.  So, it is possible to create the first line of text in block capitals and bold lettering.  This technique in CSS circles, is knows as <strong>first-line pseudo –element</strong>.  It may be used in any block-level element.  An example is shown below.<br />
P:first-line{<br />
Font-variant:small-cape;<br />
Font-weight:bold   }<br />
It is also possible to manipulate the first letter to create effects such as drop caps.  This is known as <strong>first-letter pseudo-element</strong>.  As with the <strong>first-line pseudo-element</strong>, it may be used in any block-level element, and basically, it renders the first letter of text within an assigned selector, according to the value assigned.  For example:<br />
P:first-letter  {font-size:300%; float:left}.</p>
<p>This creates a drop cap three times the normal font size.<br />
It is important to remember that not all CSS properties can be used with <strong>pseudo-elements</strong>, and that the browser version can limit how CSS is displayed. <br />
The properties that can be used with <strong>first-line pseudo-elements</strong>, are background properties, font properties. letter-spacing, word-spacing, clear, text-shadow, line-height, text- transform, vertical-align and text-decoration.<br />
<strong>First-line pseudo-elements</strong> and to a lesser degree <strong>first-letter pseudo-elements</strong>, will be fundamental to most layouts, as it gives the capability to manipulate text in such a way, as to draw the readers attention to it.  So it is important therefore, to understand how this concept works.<br />
By mastering the art of <strong>pseudo-elements</strong> and <strong>pseudo classes</strong>, you will be able to better design websites, and this will ultimately, bring its own rewards, such as recognition, satisfaction, employment, and enjoyment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dreamtemplate.com/blog/web-design-tips/pseudo-classes-and-pseudo-elements-in-css/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

