<?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>TechieDrill &#187; center</title>
	<atom:link href="http://techiedrill.com/tag/center/feed/" rel="self" type="application/rss+xml" />
	<link>http://techiedrill.com</link>
	<description>Your World Of Technical Tutorials</description>
	<lastBuildDate>Tue, 10 Aug 2010 20:39:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Vertically Center With JQuery</title>
		<link>http://techiedrill.com/2009/11/vertically-center-with-jquery/</link>
		<comments>http://techiedrill.com/2009/11/vertically-center-with-jquery/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 18:17:13 +0000</pubDate>
		<dc:creator>bprashanth</dc:creator>
				<category><![CDATA[Jquery]]></category>
		<category><![CDATA[Beginner]]></category>
		<category><![CDATA[center]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[vertically]]></category>

		<guid isPermaLink="false">http://techiedrill.com/?p=22</guid>
		<description><![CDATA[
This lesson, I&#8217;ll show you how you can vertically center elements or images by using just a bit of jQuery (javascript library).
To Download this youtube video, Click Here
Text Content:
This video is to show how to vertically center an element using jQuery library.
Horizontal centering can be achieved easily by specifying margins to &#8220;auto&#8221; in CSS.
The img [...]]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="445" height="364" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/qnSzOUaDdx8&amp;hl=en&amp;fs=1&amp;color1=0x234900&amp;color2=0x4e9e00&amp;border=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="445" height="364" src="http://www.youtube.com/v/qnSzOUaDdx8&amp;hl=en&amp;fs=1&amp;color1=0x234900&amp;color2=0x4e9e00&amp;border=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>This lesson, I&#8217;ll show you how you can vertically center elements or images by using just a bit of jQuery (javascript library).</p>
<p>To Download this youtube video, <a href="http://www.keephd.com/watch?v=qnSzOUaDdx8">Click Here</a></p>
<p>Text Content:</p>
<p>This video is to show how to vertically center an element using jQuery library.</p>
<p>Horizontal centering can be achieved easily by specifying margins to &#8220;auto&#8221; in CSS.</p>
<p>The img tag and the script tag (jQuery reference) are added to the plain HTML page. Now, the image will not be centered anyway.</p>
<p>To code with jQuery, first start with standard &lt;script type=&#8221;text/javascript&#8221;&gt; tag.</p>
<p>Then enter the following code within the script tag:</p>
<p>$(document).ready(function(){<br />
var height = $(document).height();<br />
var imageHeight = $(&#8221;img&#8221;).height();<br />
console.log(imageHeight);<br />
});</p>
<p>The console.log statement has been used to get the image height during debugging session.</p>
<p>Now, the CSS of the image is going to be edited.</p>
<p>Replace the console.log statement with the following:</p>
<p>$(&#8221;img&#8221;).css({&#8221;position&#8221; : &#8220;relative&#8221;; &#8220;top&#8221; : height/2 &#8211; imageHeight/2});</p>
<p>Now, the image is centered vertically in the page.</p>
<p>In this way, multiple values of image properties in CSS can be specified with a single $ in jQuery &#8211; (to include the properties within curly braces)</p>
<p>A single CSS property can be set like this:  $(&#8221;img&#8221;).css(&#8221;position&#8221; : &#8220;relative&#8221;);</p>
]]></content:encoded>
			<wfw:commentRss>http://techiedrill.com/2009/11/vertically-center-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
