<?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>Sid Roberts &#187; CSS</title>
	<atom:link href="http://www.sidroberts.co.uk/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sidroberts.co.uk</link>
	<description>Well, hello there! This is the site of Sid Roberts - a web developer in Leeds, England. I'm a 16-year old high school student studying Computing, Mathematics (Mechanics), Further Maths and Economics.</description>
	<lastBuildDate>Sat, 30 Jan 2010 15:49:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Scaling Images</title>
		<link>http://www.sidroberts.co.uk/2008/06/24/scaling-images/</link>
		<comments>http://www.sidroberts.co.uk/2008/06/24/scaling-images/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 17:07:42 +0000</pubDate>
		<dc:creator>Sid Roberts</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[elastic]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[img]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[scalable]]></category>

		<guid isPermaLink="false">http://www.sidroberts.co.uk/?p=40</guid>
		<description><![CDATA[The power with scaling images is immense but very few people use it on a website. Scalable images are set in either ems or percentages. For images that you know the width and height of, you can set the dimensions so that the image is not distorted: img.widescreen { width: 16em; height: 9em; } For [...]]]></description>
			<content:encoded><![CDATA[<p>The power with scaling images is immense but very few people use it on a website. Scalable images are set in either <acronym title="elastic measurement">em</acronym>s or percentages.</p>
<p>For images that you know the width and height of, you can set the dimensions so that the image is not distorted:</p>
<pre><code>img.widescreen {
	width: 16em;
	height: 9em;
}</code></pre>
<p>For unknown image sizes, one side must be set to <code>auto</code> — this will force the correct aspect ratio upon the image, avoiding any skewness:</p>
<pre><code>img.scale {
	height: auto;
	width: 75%;
}</code></pre>
<p>Scaling images are great because you can prevent them from ruining your layout by going over an edge. If they are set in percentages and have limitations, it also means that they won’t go larger than the boundaries of the page and still remain undistorted, even when the browser is resized:</p>
<pre><code>img.scale {
	height: auto;
	max-width: 100%;
	width: 30em;
}</code></pre>
<p>Using the <code>max-width</code>/<code>max-height</code> property, you can also prevent everyday images from ruining your layout as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sidroberts.co.uk/2008/06/24/scaling-images/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
