<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Using css to center an image with position:absolute</title>
	<atom:link href="http://www.gilluminate.com/2006/01/06/using-css-to-center-an-image-with-position-absolute/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gilluminate.com/2006/01/06/using-css-to-center-an-image-with-position-absolute/</link>
	<description>By Jason Gill</description>
	<lastBuildDate>Fri, 03 Feb 2012 08:45:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Chris</title>
		<link>http://www.gilluminate.com/2006/01/06/using-css-to-center-an-image-with-position-absolute/#comment-4493</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 31 Jan 2012 00:28:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gillumiante.com/2006/01/06/using-css-to-center-an-image-with-position-absolute#comment-4493</guid>
		<description>Thank you! You&#039;ve relieved so much frustration. </description>
		<content:encoded><![CDATA[<p>Thank you! You&#039;ve relieved so much frustration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Goss</title>
		<link>http://www.gilluminate.com/2006/01/06/using-css-to-center-an-image-with-position-absolute/#comment-4485</link>
		<dc:creator>James Goss</dc:creator>
		<pubDate>Fri, 20 Jan 2012 01:22:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gillumiante.com/2006/01/06/using-css-to-center-an-image-with-position-absolute#comment-4485</guid>
		<description>can also be accomplished without placing the image in a div. In case anyone else reads this ancient piece. 
 
img { position:absolute; width:600px; height:500px; left:50%;margin-left:-300px; top:200px; z-index:500;} 
 
the trick is left:50%, and then setting the margin to being -50 percent of your image size. (600wide = -300px);  
 </description>
		<content:encoded><![CDATA[<p>can also be accomplished without placing the image in a div. In case anyone else reads this ancient piece. </p>
<p>img { position:absolute; width:600px; height:500px; left:50%;margin-left:-300px; top:200px; z-index:500;} </p>
<p>the trick is left:50%, and then setting the margin to being -50 percent of your image size. (600wide = -300px);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oliver Foxley</title>
		<link>http://www.gilluminate.com/2006/01/06/using-css-to-center-an-image-with-position-absolute/#comment-1396</link>
		<dc:creator>Oliver Foxley</dc:creator>
		<pubDate>Mon, 31 Oct 2011 19:14:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gillumiante.com/2006/01/06/using-css-to-center-an-image-with-position-absolute#comment-1396</guid>
		<description>My problem is that I have a fluid width/height image inside a couple of parent divs and I need to horizontally centre the images as with this example. The only difference is your code doesn&#039;t seem to work with images that are defined in the href attribute of an anchor. There is no actual img tag markup in my HTML to define these images. 
 
 I am using external CSS to define rules that are applied to the images and can achieve a cross browser height resize so the image is always 100% height of the viewport, however I can only do this using position: absolute, despite experimenting with many different positioning options on the parent elements. Position absolute however makes my images left aligned by default. Is there another way of centering absolute elements using margins without defining a fixed width for images? &#039;margin: 0 auto;&#039; does not work here either 
 
  </description>
		<content:encoded><![CDATA[<p>My problem is that I have a fluid width/height image inside a couple of parent divs and I need to horizontally centre the images as with this example. The only difference is your code doesn&#039;t seem to work with images that are defined in the href attribute of an anchor. There is no actual img tag markup in my HTML to define these images. </p>
<p> I am using external CSS to define rules that are applied to the images and can achieve a cross browser height resize so the image is always 100% height of the viewport, however I can only do this using position: absolute, despite experimenting with many different positioning options on the parent elements. Position absolute however makes my images left aligned by default. Is there another way of centering absolute elements using margins without defining a fixed width for images? &#039;margin: 0 auto;&#039; does not work here either</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ioana</title>
		<link>http://www.gilluminate.com/2006/01/06/using-css-to-center-an-image-with-position-absolute/#comment-165</link>
		<dc:creator>ioana</dc:creator>
		<pubDate>Mon, 23 May 2011 09:30:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gillumiante.com/2006/01/06/using-css-to-center-an-image-with-position-absolute#comment-165</guid>
		<description>Thank you so much...you made my day :)</description>
		<content:encoded><![CDATA[<p>Thank you so much&#8230;you made my day <img src='http://www.gilluminate.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vincent</title>
		<link>http://www.gilluminate.com/2006/01/06/using-css-to-center-an-image-with-position-absolute/#comment-164</link>
		<dc:creator>vincent</dc:creator>
		<pubDate>Sun, 06 Mar 2011 05:48:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gillumiante.com/2006/01/06/using-css-to-center-an-image-with-position-absolute#comment-164</guid>
		<description>Owe you a beer if your ever in Reefton NZ</description>
		<content:encoded><![CDATA[<p>Owe you a beer if your ever in Reefton NZ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Molly</title>
		<link>http://www.gilluminate.com/2006/01/06/using-css-to-center-an-image-with-position-absolute/#comment-163</link>
		<dc:creator>Molly</dc:creator>
		<pubDate>Wed, 04 Aug 2010 00:40:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gillumiante.com/2006/01/06/using-css-to-center-an-image-with-position-absolute#comment-163</guid>
		<description>BTW, Gary...change the z-index in the style sheet part.  That&#039;s what I did and it worked for me.</description>
		<content:encoded><![CDATA[<p>BTW, Gary&#8230;change the z-index in the style sheet part.  That&#8217;s what I did and it worked for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Molly</title>
		<link>http://www.gilluminate.com/2006/01/06/using-css-to-center-an-image-with-position-absolute/#comment-162</link>
		<dc:creator>Molly</dc:creator>
		<pubDate>Wed, 04 Aug 2010 00:39:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gillumiante.com/2006/01/06/using-css-to-center-an-image-with-position-absolute#comment-162</guid>
		<description>You have no idea what you have just done for my life!  I have been fighting with this for SOOOO long.  Thank you, thank you, thank you!</description>
		<content:encoded><![CDATA[<p>You have no idea what you have just done for my life!  I have been fighting with this for SOOOO long.  Thank you, thank you, thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://www.gilluminate.com/2006/01/06/using-css-to-center-an-image-with-position-absolute/#comment-161</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Sat, 08 May 2010 06:03:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gillumiante.com/2006/01/06/using-css-to-center-an-image-with-position-absolute#comment-161</guid>
		<description>This almost worked for me but in this mode, I cannot change the z-index so the image is a background. I can only do this when I absolute it inside the image tag</description>
		<content:encoded><![CDATA[<p>This almost worked for me but in this mode, I cannot change the z-index so the image is a background. I can only do this when I absolute it inside the image tag</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donna McMaster</title>
		<link>http://www.gilluminate.com/2006/01/06/using-css-to-center-an-image-with-position-absolute/#comment-160</link>
		<dc:creator>Donna McMaster</dc:creator>
		<pubDate>Thu, 14 Jan 2010 23:08:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gillumiante.com/2006/01/06/using-css-to-center-an-image-with-position-absolute#comment-160</guid>
		<description>This worked fine on Firefox and IE 8, but in order to make it work on earlier IE versions I needed to add a magic &quot;clearfix&quot; div right after the div containing the centered image.

/* slightly enhanced, universal clearfix hack */
.clearfix:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: &quot; &quot;;
    clear: both;
    height: 0;
    }
.clearfix { display: inline-block; }
/* start commented backslash hack \*/
* html .clearfix { height: 1%; }
.clearfix { display: block; }
/* close commented backslash hack */

For the origins of clearfix and pointer to newer stuff, see
http://www.positioniseverything.net/easyclearing.html

Donna</description>
		<content:encoded><![CDATA[<p>This worked fine on Firefox and IE 8, but in order to make it work on earlier IE versions I needed to add a magic &#8220;clearfix&#8221; div right after the div containing the centered image.</p>
<p>/* slightly enhanced, universal clearfix hack */<br />
.clearfix:after {<br />
    visibility: hidden;<br />
    display: block;<br />
    font-size: 0;<br />
    content: &#8221; &#8220;;<br />
    clear: both;<br />
    height: 0;<br />
    }<br />
.clearfix { display: inline-block; }<br />
/* start commented backslash hack \*/<br />
* html .clearfix { height: 1%; }<br />
.clearfix { display: block; }<br />
/* close commented backslash hack */</p>
<p>For the origins of clearfix and pointer to newer stuff, see<br />
<a href="http://www.positioniseverything.net/easyclearing.html" rel="nofollow">http://www.positioniseverything.net/easyclearing.html</a></p>
<p>Donna</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donna McMaster</title>
		<link>http://www.gilluminate.com/2006/01/06/using-css-to-center-an-image-with-position-absolute/#comment-159</link>
		<dc:creator>Donna McMaster</dc:creator>
		<pubDate>Wed, 13 Jan 2010 23:32:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gillumiante.com/2006/01/06/using-css-to-center-an-image-with-position-absolute#comment-159</guid>
		<description>thank you so much! just spent a half hour trying to figure this one out and finally gave up and searched ... nifty solution!</description>
		<content:encoded><![CDATA[<p>thank you so much! just spent a half hour trying to figure this one out and finally gave up and searched &#8230; nifty solution!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

