<?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>Dev Corner &#187; CSS Basics</title>
	<atom:link href="http://devcorner.georgievi.net/category/css/cssbasic/feed" rel="self" type="application/rss+xml" />
	<link>http://devcorner.georgievi.net</link>
	<description>Software Developer's Notepad</description>
	<lastBuildDate>Fri, 12 Aug 2011 20:03:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Change the font of text with CSS</title>
		<link>http://devcorner.georgievi.net/pages/css/cssbasic/css-change-font</link>
		<comments>http://devcorner.georgievi.net/pages/css/cssbasic/css-change-font#comments</comments>
		<pubDate>Sat, 10 Oct 2009 13:53:52 +0000</pubDate>
		<dc:creator>bateto</dc:creator>
				<category><![CDATA[CSS Basics]]></category>
		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://devcorner.georgievi.net/?p=111</guid>
		<description><![CDATA[We can specify the font, with which the text to be displayed.  This made using the property font-family. Then we have to assign a value to this property.

p&#123;
    font-family: &#34;Times New Roman&#34;;
&#125;

Discussion
As well as specific fonts, such as Times New Roman or Tahoma, CSS allows the use of some more generic [...]]]></description>
			<content:encoded><![CDATA[<p>We can specify the font, with which the text to be displayed. <span id="more-111"></span> This made using the property <em>font-family</em>. Then we have to assign a value to this property.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">p<span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;Times New Roman&quot;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<h3>Discussion</h3>
<p>As well as specific fonts, such as Times New Roman or Tahoma, CSS allows the use of some more generic font families, which are:</p>
<ul>
<li>serif</li>
<li>sans-serif</li>
<li>monospace</li>
<li>cursive</li>
<li>fantasy</li>
</ul>
<p>When we specify fonts, we should not forget that there is a possibility that the user doesn&#8217;t have the defined font installed on its computer. If we define a font and it happens that the user does not have, then the text will be displayed with the default Web browser&#8217;s font.</p>
<p>We can simply use generic font names and let user&#8217;s systems to decide which font to apply. If we want the document to look like it uses Arial (sans-serif font) for example, then we could use the following code:</p>
<pre leng="css">
p{
    font-family: sans-serif;
}
</pre>
<p>It could be used also more complex declarations. Then the first font will be used, but if it is not available then the second font will be used. So there is a reason to make the last font a generic, which we will be used at any case.</p>
<pre leng="css">
p{
    font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://devcorner.georgievi.net/pages/css/cssbasic/css-change-font/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replace font tags with CSS</title>
		<link>http://devcorner.georgievi.net/pages/css/cssbasic/css-replace-font</link>
		<comments>http://devcorner.georgievi.net/pages/css/cssbasic/css-replace-font#comments</comments>
		<pubDate>Sat, 10 Oct 2009 13:47:23 +0000</pubDate>
		<dc:creator>bateto</dc:creator>
				<category><![CDATA[CSS Basics]]></category>

		<guid isPermaLink="false">http://devcorner.georgievi.net/?p=108</guid>
		<description><![CDATA[We can style text with CSS for a lot of time. So there is no big reason to continue to use the  tag to style text. Instead of this deprecated tag we could easily use CSS. 
When we use font tags, we need to set the style for each paragraph in a document.

&#60;p&#62;&#60;font color=&#34;#0000aa&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>We can style text with CSS for a lot of time. So there is no big reason to continue to use the <em><font></em> tag to style text. Instead of this deprecated tag we could easily use CSS. <span id="more-108"></span></p>
<p>When we use font tags, we need to set the style for each paragraph in a document.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;p&gt;&lt;font color=&quot;#0000aa&quot; face = &quot;&quot;Lucida Grande&quot;,Verdana,Arial,&quot;Bitstream Vera Sans&quot;,sans-serif&quot;&gt;
      This is a paragraph, that uses the deprecated font tag. If we want to make more one like it we 
      should use another font tag. This makes the system unsafe, because if we want to change
      something, then we will have to edit all the tags.
&lt;/font&gt;&lt;/p&gt;</pre></div></div>

<h3>Solution</h3>
<p>Using CSS, we would simply define in the style sheet that the <em>color</em> property of the
<p> tag is <em>#0000aa</em> and that the <em>font-family</em> should be <em>&#8220;Lucida Grande&#8221;,Verdana,Arial,&#8221;Bitstream Vera Sans&#8221;,sans-serif</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">p<span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#0000aa</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;Lucida Grande&quot;</span><span style="color: #00AA00;">,</span>Verdana<span style="color: #00AA00;">,</span>Arial<span style="color: #00AA00;">,</span><span style="color: #ff0000;">&quot;Bitstream Vera Sans&quot;</span><span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Using this rule, we make this style the default for every paragraph in the document. That makes it much easier when we want to change for example the font or the color of the paragraph.</p>
]]></content:encoded>
			<wfw:commentRss>http://devcorner.georgievi.net/pages/css/cssbasic/css-replace-font/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

