<?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: Create a Dynamically-resizing Background Image Using CSS</title> <atom:link href="http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/feed/" rel="self" type="application/rss+xml" /><link>http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/</link> <description>an oasis for idle minds</description> <lastBuildDate>Thu, 11 Mar 2010 16:57:54 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: Jonathan Hollin</title><link>http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/#comment-1569</link> <dc:creator>Jonathan Hollin</dc:creator> <pubDate>Wed, 03 Mar 2010 22:33:35 +0000</pubDate> <guid isPermaLink="false">http://blog.urbanmainframe.com/?p=1591#comment-1569</guid> <description>&lt;p&gt;&lt;a href=&quot;http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/#comment-1566&quot; rel=&quot;nofollow&quot;&gt;@Stylie&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Great stuff. Thanks for your valuable contribution Stylie. (Note: Code and comments edited for brevity.)&lt;/p&gt;</description> <content:encoded><![CDATA[<p><a href="http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/#comment-1566">@Stylie</a></p><p>Great stuff. Thanks for your valuable contribution Stylie. (Note: Code and comments edited for brevity.)</p> ]]></content:encoded> </item> <item><title>By: Stylie</title><link>http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/#comment-1566</link> <dc:creator>Stylie</dc:creator> <pubDate>Wed, 03 Mar 2010 21:02:51 +0000</pubDate> <guid isPermaLink="false">http://blog.urbanmainframe.com/?p=1591#comment-1566</guid> <description>Thought someone else might find this useful - here is the CSS for the sticky footer implemented with the full background image resizing:&lt;code&gt;/* 2 column css layout with sticky footer */ * { margin: 0; padding: 0; } html,body { margin: 0; padding: 0; width: 100%; height: 100%; } #bg_image { position: fixed; top: 0; left: 0; z-index: 1; width: 100%; } /*---------- LAYOUT --------------*/ html, body, #wrappper { height: 100%; } body &gt; #wrapper { height: auto; min-height: 100%; } #main { position: relative; width: 100%; height: 100%; top: 0; left: 0; z-index: 2; padding-bottom: 40px;  /* must be same height as the footer */ } #footer { background: #0C0; position: relative; margin-top: -40px; /* negative value of footer height */ height: 40px; z-index: 3; clear: both; } /* CLEAR FIX*/ .clearfix:after { content: &quot;.&quot;; display: block; height: 0; clear: both; visibility: hidden; } .clearfix { display: inline-block; } /* Hides from IE-mac \*/ * html .clearfix { height: 1%; } .clearfix { display: block; } /* End hide from IE-mac */ * { margin:0; padding:0; } &lt;!-- SOME CONTENT IN THE MAIN SECTION --&gt; &lt;!-- main content --&gt; &lt;!-- contentcontainer --&gt; &lt;!-- wrapper --&gt; SOME CONTENT FOR A STICKY FOOTER &lt;!-- footer --&gt; &lt;/code&gt;You just need to put your background image in the code. See ya!</description> <content:encoded><![CDATA[<p>Thought someone else might find this useful - here is the <acronym title="Cascading Style Sheets">CSS</acronym> for the sticky footer implemented with the full background image resizing:</p><p><code>/* 2 column css layout with sticky footer */<br /> * {<br /> margin: 0;<br /> padding: 0;<br /> }<br /> html,body {<br /> margin: 0; padding: 0; width: 100%; height: 100%;<br /> }<br /> #bg_image {<br /> position: fixed; top: 0; left: 0; z-index: 1; width: 100%;<br /> }<br /> /*---------- LAYOUT --------------*/<br /> html, body, #wrappper {<br /> height: 100%;<br /> }<br /> body &gt; #wrapper {<br /> height: auto; min-height: 100%;<br /> }<br /> #main {<br /> position: relative; width: 100%; height: 100%; top: 0; left: 0; z-index: 2;<br /> padding-bottom: 40px;  /* must be same height as the footer */<br /> }<br /> #footer {<br /> background: #0C0;<br /> position: relative;<br /> margin-top: -40px; /* negative value of footer height */<br /> height: 40px;<br /> z-index: 3;<br /> clear: both;<br /> }<br /> /* CLEAR FIX*/<br /> .clearfix:after {<br /> content: ".";<br /> display: block;<br /> height: 0;<br /> clear: both;<br /> visibility: hidden;<br /> }<br /> .clearfix { display: inline-block; }<br /> /* Hides from <acronym title="Internet Explorer">IE</acronym>-mac \*/<br /> * html .clearfix { height: 1%; }<br /> .clearfix { display: block; }<br /> /* End hide from <acronym title="Internet Explorer">IE</acronym>-mac */<br /> * {<br /> margin:0;<br /> padding:0;<br /> }<br /> &lt;!-- SOME CONTENT IN THE MAIN SECTION --&gt;<br /> &lt;!-- main content --&gt;<br /> &lt;!-- contentcontainer --&gt;<br /> &lt;!-- wrapper --&gt;<br /> SOME CONTENT FOR A STICKY FOOTER<br /> &lt;!-- footer --&gt;<br /> </code></p><p>You just need to put your background image in the code. See ya!</p> ]]></content:encoded> </item> <item><title>By: Matt Parkinson</title><link>http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/#comment-1459</link> <dc:creator>Matt Parkinson</dc:creator> <pubDate>Wed, 24 Feb 2010 19:26:37 +0000</pubDate> <guid isPermaLink="false">http://blog.urbanmainframe.com/?p=1591#comment-1459</guid> <description>Ignore that - I was been a spanner!! Didnt close a tag properly! Doh! Great work, thanks very much!</description> <content:encoded><![CDATA[<p>Ignore that - I was been a spanner!! Didnt close a tag properly! Doh! Great work, thanks very much!</p> ]]></content:encoded> </item> <item><title>By: Matt Parkinson</title><link>http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/#comment-1458</link> <dc:creator>Matt Parkinson</dc:creator> <pubDate>Wed, 24 Feb 2010 18:54:52 +0000</pubDate> <guid isPermaLink="false">http://blog.urbanmainframe.com/?p=1591#comment-1458</guid> <description>This has been a great help! Works great in Firefox! But sadly IE doesnt seem to like it - surprise surprise! I think I need to tweak my CSS for the content or container divs but I&#039;m running out of ideas?? http://www.landingnet.co.uk/dev/villa/index.php</description> <content:encoded><![CDATA[<p>This has been a great help! Works great in Firefox! But sadly <acronym title="Internet Explorer">IE</acronym> doesnt seem to like it - surprise surprise! I think I need to tweak my <acronym title="Cascading Style Sheets">CSS</acronym> for the content or container divs but I’m running out of ideas??<br /> <a href="http://www.landingnet.co.uk/dev/villa/index.php">http://www.landingnet.co.uk/dev/villa/index.php</a></p> ]]></content:encoded> </item> <item><title>By: Jonathan Hollin</title><link>http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/#comment-1426</link> <dc:creator>Jonathan Hollin</dc:creator> <pubDate>Tue, 23 Feb 2010 04:42:50 +0000</pubDate> <guid isPermaLink="false">http://blog.urbanmainframe.com/?p=1591#comment-1426</guid> <description>&lt;p&gt;&lt;a href=&quot;http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/#comment-1425&quot; rel=&quot;nofollow&quot;&gt;@Jenny Smith&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Jenny, try it without using a &lt;table&gt; for your background image (a simple &lt;div&gt; should suffice).&lt;/p&gt;</description> <content:encoded><![CDATA[<p><a href="http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/#comment-1425">@Jenny Smith</a></p><p>Jenny, try it without using a &lt;table&gt; for your background image (a simple &lt;div&gt; should suffice).</p> ]]></content:encoded> </item> <item><title>By: Jenny Smith</title><link>http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/#comment-1425</link> <dc:creator>Jenny Smith</dc:creator> <pubDate>Tue, 23 Feb 2010 04:24:30 +0000</pubDate> <guid isPermaLink="false">http://blog.urbanmainframe.com/?p=1591#comment-1425</guid> <description>Hi again, actually got the scrollbars to work on Mac Safari - but doesnt work on Firefox - any suggestions for what might be this cross-browser code error?  http://www.fluxprojects.org/scroll-1.html</description> <content:encoded><![CDATA[<p>Hi again, actually got the scrollbars to work on Mac Safari - but doesnt work on Firefox - any suggestions for what might be this cross-browser code error? <a href="http://www.fluxprojects.org/scroll-1.html">http://www.fluxprojects.org/scroll-1.html</a></p> ]]></content:encoded> </item> <item><title>By: Jenny Smith</title><link>http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/#comment-1421</link> <dc:creator>Jenny Smith</dc:creator> <pubDate>Tue, 23 Feb 2010 01:06:39 +0000</pubDate> <guid isPermaLink="false">http://blog.urbanmainframe.com/?p=1591#comment-1421</guid> <description>Question: I&#039;ve tried your method and other scripts - I can get the background image to scale, works great  - but can not get the scroll bars to come back on - I think its because I have DIV tags nested within the &quot;scrollable&quot; DIV - Can someone take a look at this and help me troubleshoot ?http://www.fluxprojects.org/scroll-1.html</description> <content:encoded><![CDATA[<p>Question: I’ve tried your method and other scripts - I can get the background image to scale, works great  - but can not get the scroll bars to come back on - I think its because I have DIV tags nested within the “scrollable” DIV - Can someone take a look at this and help me troubleshoot ?http://www.fluxprojects.org/scroll-1.html</p> ]]></content:encoded> </item> <item><title>By: Jonathan Hollin</title><link>http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/#comment-1377</link> <dc:creator>Jonathan Hollin</dc:creator> <pubDate>Fri, 19 Feb 2010 21:11:33 +0000</pubDate> <guid isPermaLink="false">http://blog.urbanmainframe.com/?p=1591#comment-1377</guid> <description>&lt;p&gt;Hi Chris - it just so happens that I might be able to help here! :-)&lt;/p&gt;&lt;p&gt;I have written a web-server application that will resize images on-the-fly (amongst other things). With my &lt;strong&gt;Image Director&lt;/strong&gt; application installed on your web-server your CSS would include a line like this:&lt;/p&gt;&lt;p&gt;&lt;code&gt;background: url(/image_director/image_director.php?src=../images/APlayfulPlanet.png&amp;w=250) no-repeat;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;The background image would then be resized to 250 x 250 pixels (assuming a square source image) upon its first request. The resulting, resized image would be cached on the server and then used from then on so as to minimise the footprint of the &lt;strong&gt;Image Director&lt;/strong&gt; application.&lt;/p&gt;&lt;p&gt;You can learn more (and download the application - free) here: &lt;strong&gt;&lt;a href=&quot;http://blog.urbanmainframe.com/image-director/&quot; rel=&quot;nofollow&quot;&gt;Image Director.&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Have fun!&lt;/p&gt;</description> <content:encoded><![CDATA[<p>Hi Chris - it just so happens that I might be able to help here! <img src='http://blog.urbanmainframe.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p><p>I have written a web-server application that will resize images on-the-fly (amongst other things). With my <strong>Image Director</strong> application installed on your web-server your <acronym title="Cascading Style Sheets">CSS</acronym> would include a line like this:</p><p><code>background: url(/image_director/image_director.php?src=../images/APlayfulPlanet.png&amp;amp;w=250) no-repeat;<br /></code></p><p>The background image would then be resized to 250 x 250 pixels (assuming a square source image) upon its first request. The resulting, resized image would be cached on the server and then used from then on so as to minimise the footprint of the <strong>Image Director</strong> application.</p><p>You can learn more (and download the application - free) here: <strong><a href="http://blog.urbanmainframe.com/image-director/">Image Director.</a></strong></p><p>Have fun!</p> ]]></content:encoded> </item> <item><title>By: Chris</title><link>http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/#comment-1375</link> <dc:creator>Chris</dc:creator> <pubDate>Fri, 19 Feb 2010 20:55:12 +0000</pubDate> <guid isPermaLink="false">http://blog.urbanmainframe.com/?p=1591#comment-1375</guid> <description>Question for this thread.  Is there a way control the size of the image using the background tag in CSS?  So I have header section on site which will contain a logo.  This header section is 250x250, but the image I am using is 1000x1000.  I could always scale the raw image, but was wondering if there is a way to do it via CSS.  I could change the HTML to use the IMG tag, but then I need to maintain that tag across all of the pages.  Thanks.Here is the CSS&lt;code&gt;#header #header-image { position: absolute; top: 12px; right: 30px; width: 294px; height: 234px; background: url(../images/APlayfulPlanet.png) no-repeat; } &lt;/code&gt;The HTML contains a simple DIV </description> <content:encoded><![CDATA[<p>Question for this thread.  Is there a way control the size of the image using the background tag in <acronym title="Cascading Style Sheets">CSS</acronym>?  So I have header section on site which will contain a logo.  This header section is 250x250, but the image I am using is 1000x1000.  I could always scale the raw image, but was wondering if there is a way to do it via <acronym title="Cascading Style Sheets">CSS</acronym>.  I could change the <acronym title="HyperText Markup Language">HTML</acronym> to use the IMG tag, but then I need to maintain that tag across all of the pages.  Thanks.</p><p>Here is the <acronym title="Cascading Style Sheets">CSS</acronym></p><p><code>#header #header-image {<br /> position: absolute;<br /> top: 12px; right: 30px;<br /> width: 294px;<br /> height: 234px;<br /> background: url(../images/APlayfulPlanet.png) no-repeat;<br /> }<br /> </code></p><p>The <acronym title="HyperText Markup Language">HTML</acronym> contains a simple DIV</p> ]]></content:encoded> </item> <item><title>By: Jonathan Hollin</title><link>http://blog.urbanmainframe.com/2009/05/create-a-dynamically-resizing-background-image-using-css/#comment-1178</link> <dc:creator>Jonathan Hollin</dc:creator> <pubDate>Fri, 12 Feb 2010 11:45:05 +0000</pubDate> <guid isPermaLink="false">http://blog.urbanmainframe.com/?p=1591#comment-1178</guid> <description>&lt;p&gt;Chris, you are closing your &quot;body&quot; too soon. The background image should be contained within a &quot;div&quot; pair, not a &quot;body&quot; pair.&lt;/p&gt;&lt;p&gt;Hope that helps.&lt;/p&gt;</description> <content:encoded><![CDATA[<p>Chris, you are closing your “body” too soon. The background image should be contained within a “div” pair, not a “body” pair.</p><p>Hope that helps.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Served from: blog.urbanmainframe.com @ 2010-03-14 20:13:13 by W3 Total Cache -->