<?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>Encodez Blog &#187; CSS</title>
	<atom:link href="http://encodez.com/blog/category/webdevelopement/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://encodez.com/blog</link>
	<description>Computer language design is just like a stroll in the park. Jurassic Park, that is. — Larry Wall</description>
	<lastBuildDate>Thu, 22 Jul 2010 05:34:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to make a DIV layer centered!</title>
		<link>http://encodez.com/blog/2009/05/how-to-make-a-div-layer-centered/</link>
		<comments>http://encodez.com/blog/2009/05/how-to-make-a-div-layer-centered/#comments</comments>
		<pubDate>Tue, 26 May 2009 21:06:37 +0000</pubDate>
		<dc:creator>Muneer Shaheed</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Webdevelopement]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.encodez.com/blog/?p=137</guid>
		<description><![CDATA[It is a challenge among many CSS designers to get the CSS page works same as they expected in all and every browsers. Different browsers render some of the CSS tags in different ways and some are omitted completely. No one will forget the IE 6 as a big headache and a bug full browser [...]]]></description>
			<content:encoded><![CDATA[<p>It is a challenge among many CSS designers to get the CSS page works same as they expected in all and every browsers. Different browsers render some of the CSS tags in different ways and some are omitted completely. No one will forget the IE 6 as a big headache and a bug full browser ever. It&#8217;s behavior torches  all CSS designers. Thanks Microsoft they upgraded themselves with IE7.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6032126876218296";
google_ad_slot = "8998015769";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>Centering a layer is not that much harder part. It is simple but it is the start of most web page. So it is worth knowing the right syntex that works with almost all browsers today. Following is a sample style that works in all browsers.</p>
<p><strong>CSS Style</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">&nbsp;
body <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#outerWrapper</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">900px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #cc00cc;">#999</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><strong>The Body</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;outerWrapper&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p>Cool ! It is working fine. By the way, I have a<strong> absolute positioned layer</strong>. Will this work with this idea. <img src='http://encodez.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  No problem buddy. There is nother technique using the negative margin.</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: #cc00cc;">#outerWrapper</span><span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">50</span>%</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">900px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-450px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Check wheather is this work for you. Probably it should.</p>
]]></content:encoded>
			<wfw:commentRss>http://encodez.com/blog/2009/05/how-to-make-a-div-layer-centered/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Javascript Smooth Scroller</title>
		<link>http://encodez.com/blog/2009/01/javascript-smooth-scroller/</link>
		<comments>http://encodez.com/blog/2009/01/javascript-smooth-scroller/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 10:12:51 +0000</pubDate>
		<dc:creator>Muneer Shaheed</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Free Scripts]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Webdevelopement]]></category>
		<category><![CDATA[scroller]]></category>

		<guid isPermaLink="false">http://www.encodez.com/blog/?p=92</guid>
		<description><![CDATA[I am happy to share the Javascript Scroller which I created for one of my project. Javascript Scroller has been built up with combination of CSS and Javascript. Examples : Sample 1 Sample 2 Download Link Link 1 &#8211; Link 2 Editing the width and height of Scroller It is just simple to edit the [...]]]></description>
			<content:encoded><![CDATA[<p>I am happy to share the Javascript Scroller which I created for one of my project. Javascript Scroller has been built up with combination of CSS and Javascript.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6032126876218296";
google_ad_slot = "8998015769";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<table border="0">
<tbody>
<tr>
<td align="left" valign="top">
<div id="attachment_94" class="wp-caption alignnone" style="width: 209px"><img class="size-full wp-image-94" title="Javascript Smooth Scroller" src="http://www.encodez.com/blog/wp-content/uploads/2009/01/scroller1.jpg" alt="Scroller Preview" width="199" height="582" /><br />
<p class="wp-caption-text">Scroller Preview 1</p></div></td>
<td align="left" valign="top">
<p><div id="attachment_96" class="wp-caption alignnone" style="width: 314px"><img class="size-full wp-image-96" title="Javascript Smooth Scroller" src="http://www.encodez.com/blog/wp-content/uploads/2009/01/news-image-2.jpg" alt="Preview" width="304" height="352" /><p class="wp-caption-text">Scroller Preview 2</p></div></td>
</tr>
</tbody>
</table>
<h3>Examples :</h3>
<ol>
<li><a title="Javascript Smooth Scroller - Sample 1" href="http://encodez.com/demos/Javascript_smooth_scroller_i.html" target="_blank">Sample 1</a></li>
<li><a title="Javascript Smooth Scroller - Sample 2" href="http://encodez.com/demos/Javascript_smooth_scroller_ii.html" target="_blank">Sample 2</a></li>
</ol>
<h3>Download Link</h3>
<p><a title="Download Javascript Smooth Scroller" href="http://www.encodez.com/downloads/javascript_smooth_scroller/javascript smooth scroller.zip" target="_blank"><strong>Link 1</strong></a> &#8211;   <strong>Link 2</strong></p>
<p><div id="attachment_103" class="wp-caption aligncenter" style="width: 360px"><img class="size-full wp-image-103" title="Compatibility with almost all browsers" src="http://www.encodez.com/blog/wp-content/uploads/2009/01/all-browser-compatible-smoo.gif" alt="Browser compatibility" width="350" height="200" /><p class="wp-caption-text">Browser compatibility</p></div>
<h3>Editing the width and height of Scroller</h3>
<p>It is just simple to edit the size or any other style of Smooth Scroller.</p>
<p><strong>CSS to change</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#encFilmMain</span>
<span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">160px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* full width */</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#encFilm</span>
<span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">300px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* height */</span>
   <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#999</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#encFilmInner</span>
<span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#efefef</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">290px</span><span style="color: #00AA00;">;</span>  <span style="color: #808080; font-style: italic;">/* height */</span>
   <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><strong>Javascript to change</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> scrollAmount<span style="color: #339933;">=</span><span style="color: #CC0000;">240</span><span style="color: #339933;">;</span>  <span style="color: #006600; font-style: italic;">// scroll amount</span>
<span style="color: #003366; font-weight: bold;">var</span> barHeight<span style="color: #339933;">=</span><span style="color: #CC0000;">290</span><span style="color: #339933;">;</span>  <span style="color: #006600; font-style: italic;">//height</span></pre></td></tr></table></div>

<p>If you like or you have any doubts, please do not forget to leave your comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://encodez.com/blog/2009/01/javascript-smooth-scroller/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
	</channel>
</rss>
