<?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>How To PHP - PHP Technology, PHP Tutorial, Database Tutorials, CMS System &#187; css</title>
	<atom:link href="http://www.phpmind.com/blog/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpmind.com/blog</link>
	<description>Future of web development</description>
	<lastBuildDate>Tue, 25 Oct 2011 21:38:58 +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>What are the differences between absolute and relative positioning?</title>
		<link>http://www.phpmind.com/blog/2010/09/what-are-the-differences-between-absolute-and-relative-positioning/</link>
		<comments>http://www.phpmind.com/blog/2010/09/what-are-the-differences-between-absolute-and-relative-positioning/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 03:06:58 +0000</pubDate>
		<dc:creator>om</dc:creator>
				<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=894</guid>
		<description><![CDATA[Absolute This is a very powerful type of positioning that allows you to literally place any page element exactly where you want it. You use the positioning attributes top, left bottom and right to set the location. Remember that these values will be relative to the next parent element with relative (or absolute) positioning. If [...]]]></description>
			<content:encoded><![CDATA[<h2>Absolute</h2>
<p>This is a very powerful type of positioning that allows you to literally place any page element exactly where you want it. You use the positioning attributes top, left bottom and right to set the location. Remember that these values will be relative to the next parent element with relative (or absolute) positioning. If there is no such parent, it will default all the way back up to the   element itself meaning it will be placed relatively to the page itself.</p>
<p>Most important thing about absolute positioning is that these elements are removed from the flow of elements on the page. An element with this type of positioning is not affected by other elements and it doesn’t affect other elements. This is a serious thing to consider every time you use absolute positioning.</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p894code3'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p8943"><td class="code" id="p894code3"><pre class="html" style="font-family:monospace;">&lt;html&gt;
&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
h2
{
position:absolute;
left:100px;
top:150px;
}
&lt;/style&gt;
&lt;/head&gt;
&nbsp;
&lt;body&gt;
&lt;h2&gt;This is a heading with an absolute position&lt;/h2&gt;
&lt;p&gt;With absolute positioning, an element can be placed anywhere on a page. The heading below is placed 100px from the left of the page and 150px from the top of the page.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<h2>Relative</h2>
<p>This type of positioning is probably the most confusing and misused. What it really means is “relative to itself”.<br />
A relative positioned element is positioned relative to its normal position. The content of a relatively positioned elements can be moved and overlap other elements, but the reserved space for the element is still preserved in the normal flow.<br />
Relatively positioned element are often used as container blocks for absolutely positioned elements.<br />
example -</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p894code4'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p8944"><td class="code" id="p894code4"><pre class="html" style="font-family:monospace;">&lt;html&gt;
&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
h2.pos_top
{
position:relative;
top:-50px;
}
&lt;/style&gt;
&lt;/head&gt;
&nbsp;
&lt;body&gt;
&lt;h2&gt;This is a heading with no position&lt;/h2&gt;
&lt;h2 class=&quot;pos_top&quot;&gt;This heading is moved upwards according to its normal position&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; Even if the content of the relatively positioned element is moved, the reserved space for the element is still preserved in the normal flow.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.phpmind.com%2Fblog%2F2010%2F09%2Fwhat-are-the-differences-between-absolute-and-relative-positioning%2F&amp;title=What%20are%20the%20differences%20between%20absolute%20and%20relative%20positioning%3F" id="wpa2a_2"><img src="http://www.phpmind.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmind.com/blog/2010/09/what-are-the-differences-between-absolute-and-relative-positioning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is CSS Image Sprites?</title>
		<link>http://www.phpmind.com/blog/2010/07/what-is-css-image-sprites/</link>
		<comments>http://www.phpmind.com/blog/2010/07/what-is-css-image-sprites/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 00:44:07 +0000</pubDate>
		<dc:creator>om</dc:creator>
				<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=724</guid>
		<description><![CDATA[An image sprite is a collection of images put into a single image. What is advantage of using image sprite? Reduce multiple server requests. Sprites reduce the number of server requests and save bandwidth. Another advantage of sprites is that you can keep all your images in one location and in some cases it makes [...]]]></description>
			<content:encoded><![CDATA[<p>An image sprite is a collection of images put into a single image.</p>
<p><strong>What is advantage of using image sprite? </strong></p>
<ol>
<li>Reduce multiple server requests.</li>
<li>Sprites reduce the number of server requests and save bandwidth.</li>
<li>Another advantage of sprites is that you can keep all your images in one  location and in some cases it makes more sense (for menus and so on).</li>
</ol>
<p><strong>A real life Example </strong><br />
If you use sprites for a &#8220;mouse over&#8221; display, the user won’t experience image disappear for a second&#8230; and it looks really good when you have heavy graphics in your site.<br />
If you change the image instead of just moving the sprite around it will load a new image and the loading time can be visible to the end user.</p>
<p><strong>CSS Image Sprites Example Code</strong></p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p724code6'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p7246"><td class="code" id="p724code6"><pre class="css" style="font-family:monospace;">.NotGood<span style="color: #00AA00;">&#123;</span>
&nbsp;
  <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;">sprites.jpg</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.NotGood</span><span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">&#123;</span>
&nbsp;
  <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;">spritesHover.jpg</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
.Good<span style="color: #00AA00;">&#123;</span>
&nbsp;
  <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;">sprites.jpg</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.Good</span><span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">&#123;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>You can use Adobe Photoshop or any other image editing software to determine which area needs to be display.</p>
<p style="text-align: center;"><a href="http://www.phpmind.com/blog/wp-content/uploads/2010/07/phpmind-css-sprint.png"><img class="size-full wp-image-725  aligncenter" title="phpmind-css-sprint" src="http://www.phpmind.com/blog/wp-content/uploads/2010/07/phpmind-css-sprint.png" alt="" width="445" height="248" /></a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.phpmind.com%2Fblog%2F2010%2F07%2Fwhat-is-css-image-sprites%2F&amp;title=What%20is%20CSS%20Image%20Sprites%3F" id="wpa2a_4"><img src="http://www.phpmind.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmind.com/blog/2010/07/what-is-css-image-sprites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

