<?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>The Web Development Blog &#187; HTML</title>
	<atom:link href="http://www.thewebdevelopmentblog.com/category/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thewebdevelopmentblog.com</link>
	<description>News, tips, scripts and tutorials for web developers.</description>
	<lastBuildDate>Thu, 25 Aug 2011 11:15:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>The death of Flash.</title>
		<link>http://www.thewebdevelopmentblog.com/2010/05/the-death-of-flash/</link>
		<comments>http://www.thewebdevelopmentblog.com/2010/05/the-death-of-flash/#comments</comments>
		<pubDate>Sun, 09 May 2010 12:19:38 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.thewebdevelopmentblog.com/?p=445</guid>
		<description><![CDATA[I&#8217;ve always been against Adobe Flash. It&#8217;s slow, CPU consuming, insecure, painful to work with and overly very user unfriendly. Finally my dislike for Flash is being met with by powerful companies who are all now rallying against Flash and pushing towards HTML 5. It all started with Steve Jobs writing a letter announcing why [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always been against Adobe Flash. It&#8217;s slow, CPU consuming, insecure, painful to work with and overly very user unfriendly. Finally my dislike for Flash is being met with by powerful companies who are all now rallying against Flash and pushing towards HTML 5.</p>
<p><span id="more-445"></span></p>
<p>It all started with Steve Jobs writing <a href="http://www.apple.com/hotnews/thoughts-on-flash/">a letter</a> announcing why Flash will never be supported on the iPhone or iPad. It has been the talk of the industry and now more hands are rising in favour of ditching Flash and living with HTML 5. Following is Opera (the browser) and Microsoft both stating that they back HTML 5 in favour of Flash. (Microsoft clearly doesn&#8217;t realise it&#8217;s Silverlight is likely to die as well)</p>
<p>With Javascript being able to do most of Flash&#8217;s tricks natively it&#8217;s main purpose has been used for video and audio. Now HTML 5 can do both of these making Flash virtually pointless.</p>
<p>YouTube, Vimeo and Scribd are just a few of the sites that used to rely heavily on Flash that are taking advantage of HTML 5 features to rid themselves of Flash for a better user experience. I myself have been working of ridding Flash out of my sites, namely <a href="http://www.NexTunes.com.au" target="_blank">NexTunes.com.au</a>&#8216;s audio player will run using the audio tag in browsers which support it coming the next release of the site and it will also say goodbye to any Flash based ads.</p>
<p>Adobe are obviously concerned about this recent onslaught from competitors and will be interesting to see whether or not they try new techniques to keep Flash alive.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2010/05/the-death-of-flash/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>YouTube supports HTML 5 to rid Flash</title>
		<link>http://www.thewebdevelopmentblog.com/2010/01/youtube-supports-html-5-to-rid-flash/</link>
		<comments>http://www.thewebdevelopmentblog.com/2010/01/youtube-supports-html-5-to-rid-flash/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 23:41:12 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://thewebdevelopmentblog.com/?p=425</guid>
		<description><![CDATA[YouTube has just launched an opt-in beta to support a HTML 5 instead of the flash player that we&#8217;re used to. If you&#8217;re like me you try to avoid using Flash where-ever possible, and HTML 5&#8242;s video support is a step closer to a Flash-free web. The beta currently supports the following browsers: Google Chrome [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.youtube.com" target="_blank">YouTube</a> has just launched an opt-in beta to support a HTML 5 instead of the flash player that we&#8217;re used to. If you&#8217;re like me you try to avoid using Flash where-ever possible, and HTML 5&#8242;s video support is a step closer to a Flash-free web.</p>
<p><span id="more-425"></span></p>
<p>The beta currently supports the following browsers:</p>
<ul>
<li>Google Chrome</li>
<li>Safari (4+)</li>
<li>Internet Explorer with Chrome Frame installed</li>
</ul>
<p>If you&#8217;re using one of these browsers, jump on to the YouTube HTML 5 beta page to opt-in and start trying out the Flash-free video player.</p>
<p><a href="http://www.youtube.com/html5" target="_blank">http://www.youtube.com/html5</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2010/01/youtube-supports-html-5-to-rid-flash/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to make a div stretch to 100% of the window height &amp; fixing the background color or image not covering the entire window</title>
		<link>http://www.thewebdevelopmentblog.com/2009/11/how-to-make-a-div-stretch-to-100-of-the-window-height-fixing-the-background-color-or-image-not-covering-the-entire-window/</link>
		<comments>http://www.thewebdevelopmentblog.com/2009/11/how-to-make-a-div-stretch-to-100-of-the-window-height-fixing-the-background-color-or-image-not-covering-the-entire-window/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 10:30:42 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://thewebdevelopmentblog.com/?p=402</guid>
		<description><![CDATA[I know, it&#8217;s massively long title, but I thought I&#8217;d fix too issues with 1 post as they both have the identical solution. The main one is when creating some sites recently they were fairly short designs and bizarrely the CSS background color didn&#8217;t fill the window. This was puzzling, but I did find a solution. The [...]]]></description>
			<content:encoded><![CDATA[<p>I know, it&#8217;s massively long title, but I thought I&#8217;d fix too issues with 1 post as they both have the identical solution. The main one is when creating some sites recently they were fairly short designs and bizarrely the CSS background color didn&#8217;t fill the window. This was puzzling, but I did find a solution. The other issue is when you&#8217;re trying to make a div to stretch to fill a window, it doesn&#8217;t like to do it, the solution for this is the same as the other issue.</p>
<p><span id="more-402"></span></p>
<h1>The Problems</h1>
<p><strong>a) </strong>Your background won&#8217;t fill the screen even though you&#8217;ve set the color in the body via CSS as per below:</p>
<div id="attachment_404" class="wp-caption alignnone" style="width: 310px"><a href="http://thewebdevelopmentblog.com/wp-content/uploads/2009/11/Screen-shot-2009-10-31-at-6.26.49-PM.png"><img class="size-medium wp-image-404" title="Screen shot 2009-10-31 at 6.26.49 PM" src="http://thewebdevelopmentblog.com/wp-content/uploads/2009/11/Screen-shot-2009-10-31-at-6.26.49-PM-300x191.png" alt="Background doesn't fill the screen" width="300" height="191" style="border:1px solid #000;<br />
"/></a><p class="wp-caption-text">Background doesn&#39;t fill the screen</p></div>
<p><strong>b)</strong> Can&#8217;t get a div or other element to stretch 100% of the browser window.</p>
<h1>The Solution</h1>
<p>It&#8217;s quite simple, in your CSS put <em>height: 100%;</em> in <strong>both</strong> the html and body as follows:</p>
<p><code></p>
<pre>html {
  height: 100%;
}

body {
  height: 100%;
  ........
}</pre>
<p></code></p>
<h1>Why does it occur?</h1>
<p>The reasons these problems occur is because most browsers don&#8217;t automatically render the page/body to 100% of the browser windows height.  This in turn means that when the background is rendered on the body or the height is set to 100% it will only fill 100% of whatever the body is. This is why setting the html and body&#8217;s height to 100% will fix the issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2009/11/how-to-make-a-div-stretch-to-100-of-the-window-height-fixing-the-background-color-or-image-not-covering-the-entire-window/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML 5 is coming [video]</title>
		<link>http://www.thewebdevelopmentblog.com/2009/10/html-5-is-coming/</link>
		<comments>http://www.thewebdevelopmentblog.com/2009/10/html-5-is-coming/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 05:08:26 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[FOWA]]></category>
		<category><![CDATA[HTML 5]]></category>

		<guid isPermaLink="false">http://thewebdevelopmentblog.com/?p=383</guid>
		<description><![CDATA[So unless you&#8217;ve had your head under a rock for the past year or so you&#8217;ll have heard about HTML 5. But what&#8217;s to be expected in HTML 5 and when can we start using it? Well, you could start using it today in theory, however the full HTML 5 spec isn&#8217;t quite finished meaning [...]]]></description>
			<content:encoded><![CDATA[<p>So unless you&#8217;ve had your head under a rock for the past year or so you&#8217;ll have heard about HTML 5. But what&#8217;s to be expected in HTML 5 and when can we start using it? Well, you could start using it today in theory, however the full HTML 5 spec isn&#8217;t quite finished meaning browsers haven&#8217;t rolled out all the features. So who&#8217;s on board and what exactly can you do?</p>
<p><span id="more-383"></span></p>
<p>Well all major browser developers are on board INCLUDING Microsoft. This is great news, and it&#8217;s good to see Microsoft beginning to show support for these standards and <a href="http://www.browserforthebetter.com/" target="_blank">putting in the effort</a> to get IE6 + 7 users to upgrade to version 8. Thank you Microsoft!</p>
<p>Instead of me rambling on about what&#8217;s coming and what&#8217;s currently supported, I&#8217;ll show you a video from FOWA London 2009 of Bruce Lawson from Opera talking about HTML 5 and demoing on various browsers.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="220" 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://vimeo.com/moogaloop.swf?clip_id=6985053&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="220" src="http://vimeo.com/moogaloop.swf?clip_id=6985053&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>So many of the HTML 5 features are out and running in some browsers. However, the fact is until the modern browser uptake is greater we&#8217;d just be needing to code 2 sets of scripts, one for old and one for new. So at least for the next few years there is not a huge advantage in jumping onboard the HTML 5 train.</p>
<p><strong>Useful Links:</strong></p>
<ul>
<li><a href="http://html5doctor.com/" target="_blank">http://html5doctor.com/</a></li>
<li><a href="http://html5demos.com/" target="_blank">http://html5demos.com/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2009/10/html-5-is-coming/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Finding &amp; working with &#8220;the loop&#8221; in WordPress templates.</title>
		<link>http://www.thewebdevelopmentblog.com/2009/06/tutorial-finding-working-with-the-loop-in-wordpress-templates/</link>
		<comments>http://www.thewebdevelopmentblog.com/2009/06/tutorial-finding-working-with-the-loop-in-wordpress-templates/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 15:28:43 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://thewebdevelopmentblog.com/?p=235</guid>
		<description><![CDATA[So you know HTML, but not PHP &#8211; you&#8217;re trying to follow WordPress tutorials, they refer to the infamous &#8220;loop&#8221;&#8230; But where is it, what is it, and how do you find it? I&#8217;m going to run through &#8220;the loop&#8221; what it does and how to find it in your WordPress theme. What is it? [...]]]></description>
			<content:encoded><![CDATA[<p>So you know HTML, but not PHP &#8211; you&#8217;re trying to follow WordPress tutorials, they refer to the infamous &#8220;loop&#8221;&#8230; But where is it, what is it, and how do you find it? I&#8217;m going to run through &#8220;the loop&#8221; what it does and how to find it in your WordPress theme.</p>
<p><span id="more-235"></span></p>
<p><strong>What is it?</strong></p>
<p>To learn how to find the loop, it would be good to know what it does, and it&#8217;s purpose within a template. Loops are used in virtually all computer programming languages, it&#8217;s purpose it to repeat a set of tasks. Basically, you could code the same thing 10 times or use a loop to repeat the action 10 times. In WordPress, loops are used to get each blog article, or piece of information from the database, then read it out in HTML. This is how you see multiple articles presented on your blogs homepage without the code being in the template for each article. &#8220;The Loop&#8221; will generally only be on the <em>index.php</em> page of your template.</p>
<p><strong>Finding the loop&#8230;</strong></p>
<p>Every PHP programmer will program their template differently which means each loop is different. to combat this I&#8217;m going to attempt to arm you with the basics of PHP so that you can understand the workings of the code and find &#8220;the loop&#8221;.</p>
<p><strong>Reading PHP</strong></p>
<p>Lets start with separating the PHP from the HTML. It is important to recognise the difference between PHP and HTML, PHP being what&#8217;s known as a &#8220;Server-Side Language&#8221; and HTML being a &#8220;Client-Side Language&#8221;. PHP is run on the server, hence the term &#8220;Server-Side Language&#8221; &#8211; All PHP scripts are read by the server before any information is sent to the web browser for the &#8220;client&#8221; to see. HTML being &#8220;Client-Side&#8221; is read by the web browser on the clients side &#8211; using their computer resources, not the servers. &#8220;Server-Side&#8221; scripting will always be processed first on the server, then the information will be sent the &#8220;Client-Side&#8221; so it can present the information to you.</p>
<p>Finding the PHP is fairly easy. All PHP is enclosed between either of the following:</p>
<pre><code>&lt;?php
	// PHP script here
?&gt;
</code>
<code>&lt;?
	// PHP script here
?&gt;
</code></pre>
<p>Both &lt;? php &amp; &lt;? do the exact same thing, just one is shorter than the other. ?&gt; will signal the end of a set of PHP scripting. So to find &#8220;the loop&#8221; you need to look within these.</p>
<p><strong>The start of the loop!</strong></p>
<p>The proper term for the most commonly used &#8220;loop&#8221; in WordPress is a &#8220;while loop&#8221;. The most commonly used  &#8220;while&#8221; codes will look like this:</p>
<p><code>while (have_posts()) : the_post();</code><br />
<code>if (have_posts()) : while (have_posts()) : the_post();</code></p>
<p>This is the start of &#8220;the loop&#8221;. It&#8217;s effectively telling the server &#8220;while there is new posts, do the following&#8221;. Not too different to standard English. The &#8220;if&#8221; on the second code is first asking &#8220;if there is a post, then do the while loop&#8221;.</p>
<p>It might be an idea to mark this spot for reference, so after the PHP script put a HTML comment like follows:</p>
<pre><code>&lt;?php while (have_posts()) : the_post(); ?&gt;
	&lt;!-- Start of the loop --&gt;
</code></pre>
<p><strong>The end of the loop!</strong></p>
<p>Now we&#8217;ve found the start of &#8220;the loop&#8221;, we need to find the end. This should always look as follows:</p>
<p><code>endwhile;</code></p>
<p>This will end the content that is being &#8220;looped&#8221;.</p>
<p>Lets mark the end of &#8220;the loop&#8221; with a HTML comment once more but this time above the PHP script like follows:</p>
<pre><code>	&lt;!-- End of the loop --&gt;
&lt;?php endwhile; ?&gt;
</code></pre>
<p>Okay so now you have found &#8220;the loop&#8221; the content within where you have marked is inside the loop, anything outside this script area is &#8220;outside the loop&#8221;. HTML within this loop will behave as normal HTML however it is just repeated multiple times.</p>
<p>So there we have it &#8211; finding &#8220;the loop&#8221; in a nutshell. &#8220;The loop&#8221; will generally only be on the home page and there should only be one loop, if you find multiple loops, use your HTML knowledge to find which is the correct loop for what you are trying to do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2009/06/tutorial-finding-working-with-the-loop-in-wordpress-templates/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New version of gzip for Javascript &amp; CSS now available</title>
		<link>http://www.thewebdevelopmentblog.com/2008/12/script-new-version-of-gzip-for-javascript-css-now-available/</link>
		<comments>http://www.thewebdevelopmentblog.com/2008/12/script-new-version-of-gzip-for-javascript-css-now-available/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 05:04:41 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Compression]]></category>
		<category><![CDATA[Gzip]]></category>

		<guid isPermaLink="false">http://thewebdevelopmentblog.com/?p=143</guid>
		<description><![CDATA[I&#8217;ve released version 1.1.1 of my gzip php script for Javascript and CSS which is a minor updates and adds a few handy new features. You can get the latest version of the script here. You can read the release notes here.]]></description>
			<content:encoded><![CDATA[<div>
<p>I&#8217;ve released version 1.1.1 of my gzip php script for Javascript and CSS which is a minor updates and adds a few handy new features. You can get the latest version of the script <a title="Go to the Gzip compression blog post" href="http://thewebdevelopmentblog.com/2008/10/tip-speed-up-your-websites-using-gzip-and-merging-files/" target="_self">here</a>. You can read the <a title="View the gzip compression release notes" href="http://thewebdevelopmentblog.com/examples/gzip/gzip/releasenotes.txt" target="_blank">release notes here</a>.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2008/12/script-new-version-of-gzip-for-javascript-css-now-available/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Gzip compression script for javascript and CSS updated</title>
		<link>http://www.thewebdevelopmentblog.com/2008/11/tipscript-gzip-compression-script-for-javascript-and-css-updated/</link>
		<comments>http://www.thewebdevelopmentblog.com/2008/11/tipscript-gzip-compression-script-for-javascript-and-css-updated/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 09:21:11 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Compression]]></category>
		<category><![CDATA[Gzip]]></category>

		<guid isPermaLink="false">http://thewebdevelopmentblog.com/?p=140</guid>
		<description><![CDATA[Today I&#8217;ve updated my gzip compression for javascript and CSS script to fix a security flaw. If you&#8217;re using V1.0 I advise you update to V1.1 which is available here. You can read the release notes here.]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve updated my gzip compression for javascript and CSS script to fix a security flaw. If you&#8217;re using V1.0 I advise you update to V1.1 which is available <a title="Go to the Gzip compression blog post" href="http://thewebdevelopmentblog.com/2008/10/tip-speed-up-your-websites-using-gzip-and-merging-files/" target="_self">here</a>. You can read the <a title="View the gzip compression release notes" href="http://thewebdevelopmentblog.com/examples/gzip/gzip/releasenotes.txt" target="_blank">release notes here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2008/11/tipscript-gzip-compression-script-for-javascript-and-css-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Small height divs in Internet Explorer</title>
		<link>http://www.thewebdevelopmentblog.com/2008/10/tip-small-height-divs-in-internet-explorer/</link>
		<comments>http://www.thewebdevelopmentblog.com/2008/10/tip-small-height-divs-in-internet-explorer/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 06:21:10 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://thewebdevelopmentblog.com/?p=131</guid>
		<description><![CDATA[If you want to make a div of a height smaller then around 10px, often in Internet Explorer will not make the div any smaller than around 12px. This is a real pain if you want to use div&#8217;s to create lines and various other things. Thankfully I&#8217;m here to tell you how to get [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to make a div of a height smaller then around 10px, often in Internet Explorer will not make the div any smaller than around 12px. This is a real pain if you want to use div&#8217;s to create lines and various other things. Thankfully I&#8217;m here to tell you how to get around this problem.</p>
<p><span id="more-131"></span></p>
<p><strong>The Solution</strong></p>
<p>All you need to do is in your CSS is set the overflow as hidden.</p>
<p><code>overflow: hidden;</code></p>
<p>Here&#8217;s an inline example.</p>
<p><code>&lt;div style="width:100%; height:1px; overflow:hidden; background-color:#000;"&gt;&lt;/div&gt;</code></p>
<p><strong>So why won&#8217;t Internet Explorer let it go less then 12px without this?</strong></p>
<p>When you make a div in IE it will automatically stretch to the size of the content and not the height that you&#8217;ve set in your CSS. In typical IE fashion, it will always think there is text inside the div even when there isn&#8217;t, thus forcing the div to fit the size font you have set. Telling it to hide the overflow will then tell it &#8220;we don&#8217;t care if it goes over, just hide it!&#8221; fixing our problem. You can also change the font-size to smaller which IE will then allow the div to shrink to the height of the smaller font-size you&#8217;ve set. The overflow option is probably better, but both will do the trick. Now we have solved another Internet Explorer problem&#8230; There&#8217;s still more to come, so keep a look out!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2008/10/tip-small-height-divs-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cross browser table cell spacing with both fixed &amp; percentage width cells</title>
		<link>http://www.thewebdevelopmentblog.com/2008/10/tip-cross-browser-table-cell-spacing-with-both-fixed-flexible-width-cells/</link>
		<comments>http://www.thewebdevelopmentblog.com/2008/10/tip-cross-browser-table-cell-spacing-with-both-fixed-flexible-width-cells/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 08:43:51 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tables]]></category>

		<guid isPermaLink="false">http://thewebdevelopmentblog.com/?p=104</guid>
		<description><![CDATA[Today I had a hard time trying to create a table which had some cells of a fixed width, then the others stretching to fill the rest of the page. The problem was I just could not get it to work properly in every browser. If I got it to work one way in one [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had a hard time trying to create a table which had some cells of a fixed width, then the others stretching to fill the rest of the page. The problem was I just could not get it to work properly in every browser. If I got it to work one way in one browser, another wouldn&#8217;t and vise versa. After messing around for a bit I found the solution, it&#8217;s kind of a forceful way to get all the browsers to do what we want, but sometimes the browsers force us to do it!</p>
<p><span id="more-104"></span>The set-up I wanted to achieve was as follows&#8230;</p>
<p><a href="http://thewebdevelopmentblog.com/wp-content/uploads/2008/10/flextofit1.gif"><img class="alignnone size-full wp-image-106" title="flextofit1" src="http://thewebdevelopmentblog.com/wp-content/uploads/2008/10/flextofit1.gif" alt="" width="400" height="63" /></a></p>
<p>Very commonly used design, yet getting it to play ball was more painful.</p>
<p>You&#8217;d think that the following would do the trick&#8230;</p>
<pre><code>&lt;table cellpadding="0" cellspacing="0" style="width:100%"&gt;
	&lt;tr&gt;
		&lt;td style="background-image:url(image);"&gt;&lt;/td&gt;
		&lt;td style="width:800px"&gt;&lt;/td&gt;
		&lt;td style="background-image:url(image);"&gt;&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;</code></pre>
<p>What you&#8217;ll find is the two side panels will stretch perfectly as wanted in some browsers, however others do not want to play ball.</p>
<p><strong>The Solution:</strong></p>
<p>The solution is thankfully fairly simple, however it&#8217;s not a very clean way of doing it. But the point is it will do the trick. What you need to do is give the two side panels a percentage width of 50% each (or if you have 1 flexible table cell, then 100%). Now in some browsers this will shrink the middle cell to nothing unless it has content to stretch it to the fixed width. If you don&#8217;t have the content in there to do that already, add in a transparent image and size it to the width of the cell. For example:</p>
<pre><code>&lt;table cellpadding="0" cellspacing="0" style="width:100%"&gt;
	&lt;tr&gt;
		&lt;td style="background-image:url(image); width:50%;"&gt;&lt;/td&gt;
		&lt;td style="width:800px"&gt;
			&lt;img src="images/spacer.gif" width="800" height="1" border="0" alt="Spacer"&gt;
		&lt;/td&gt;
		&lt;td style="background-image:url(image); width:50%;"&gt;&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;</code></pre>
<p>The above will (forcefully) behave as we want it to. If you have a table inside the fixed size cell, usually if you set the tables width it will be enough to force the cell to stay at it&#8217;s fixed width.</p>
<p>So there you have it, the above worked in IE, Safari, Firefox, Opera, Chrome and on the iPhone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2008/10/tip-cross-browser-table-cell-spacing-with-both-fixed-flexible-width-cells/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speed up your websites using gzip and merging files.</title>
		<link>http://www.thewebdevelopmentblog.com/2008/10/tip-speed-up-your-websites-using-gzip-and-merging-files/</link>
		<comments>http://www.thewebdevelopmentblog.com/2008/10/tip-speed-up-your-websites-using-gzip-and-merging-files/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 08:07:50 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Compression]]></category>
		<category><![CDATA[Gzip]]></category>
		<category><![CDATA[Website Optimization]]></category>

		<guid isPermaLink="false">http://thewebdevelopmentblog.com/?p=95</guid>
		<description><![CDATA[Many sites these days are using more and more Javascript and CSS which can quickly slow the websites loading speed. Gzip compression for your Javascript and CSS is not used in enough websites these days as many people still fear incompatibility with browsers. However this is no longer the case as all modern browsers are [...]]]></description>
			<content:encoded><![CDATA[<p>Many sites these days are using more and more Javascript and CSS which can quickly slow the websites loading speed. Gzip compression for your Javascript and CSS is not used in enough websites these days as many people still fear incompatibility with browsers. However this is no longer the case as all modern browsers are now compatible with it. There are heaps of ways to Gzip, none of which I could get to work on my web host, so I created my own which uses the zlib extension in php. I also included a few advantages to it such as merging of files which helps decrease the loading time even more.</p>
<p><span id="more-95"></span></p>
<h1><strong>Step 1: </strong>Add the gzip.php file.</h1>
<p><a title="Download the gzip.php file and example here." href="http://thewebdevelopmentblog.com/examples/gzip/gzip.zip" target="_self">Download the gzip.php file here. (V1.1.1)</a></p>
<p>Then add it to the root directory of your website.</p>
<h1><strong>Step 2:</strong> Adjust your HTML.</h1>
<p>We now need to set your Javascript and CSS to run through the compression. We do this by adjusting the script and style addresses as follows&#8230;</p>
<p><strong>For CSS</strong></p>
<p><code>&lt;link href="gzip.php?f0=<em>css/main.css</em>" rel="stylesheet" type="text/css"&gt;</code></p>
<p><strong>For Javascript</strong></p>
<p><code>&lt;script src="gzip.php?f0=<em>javascript/main.js</em>" type="text/javascript"&gt;&lt;/script&gt;</code></p>
<p>To change the address of the scripts just change the address that is in italic. Files are restricted to only files with the .css or .js extension.</p>
<h1><strong>Step 3: </strong>Merging Files.</h1>
<p>Another slow point for loading time is using multiple Javascript files and CSS style sheets. The reason for this is for each file the browser needs to re-connect to the server before it can download it. However if you&#8217;re like me, you don&#8217;t want to have to merge all your files into 1 manually, so I&#8217;ve built in this ability into gzip.php. Simply merge files together as follows&#8230;</p>
<p><strong>For CSS</strong></p>
<p><code>&lt;link href="gzip.php?f0=<em>css/main.css</em>&amp;f1=<em>css/more.css</em>&amp;f2=<em>css/evenmore.css</em>" rel="stylesheet" type="text/css"&gt;</code></p>
<p><strong>For Javascript</strong></p>
<p><code>&lt;script src="gzip.php?f0=<em>javascript/main.js</em>&amp;f1=<em>javascript/more.js</em>&amp;f2=<em>javascript/evenmore.js</em>" type="text/javascript"&gt;&lt;/script&gt;</code></p>
<p>So as you can see you can add files by adding in more <em>f</em> variables which count up from 0. You can add up to 100 files in the current configuration. Although if you have that many Javascript or CSS files then you should look at fixing that&#8230;</p>
<p><strong>NOTE: </strong>Make sure you don&#8217;t miss any numbers when counting up otherwise it won&#8217;t include all your files.</p>
<h1><strong>Step 4: </strong>Caching Files.</h1>
<p>Another trick that will help speed up your site is caching these files. Again I have that covered! Simply add <em>cache=true&amp;</em> to the front of the file address as follows&#8230;</p>
<p><code>gzip.php?<em>cache=true&amp;</em>f0=javascript/main.js&amp;f1=javascript/more.js</code></p>
<p>If you don&#8217;t want to have the default 3 days expiry you may add in exp=#ofDays&amp; and it will change the expiry period. For example the following will set the cache period to 31 days&#8230;</p>
<p><code>gzip.php?cache=true&amp;exp=31&amp;f0=javascript/main.js&amp;f1=javascript/more.js</code></p>
<p><strong>NOTE: </strong>It is not recommended that you cache files that are updated frequently as when the file is updated it won&#8217;t update in the browser for the number of days you set.</p>
<p>And there you have it! I have decreased loading time on my sites dramatically using this exact script so I hope it helps you out as much as it has with me!</p>
<p><strong>UPDATE:</strong> Just released version 1.1.1 which adds new functionality and better ways to pinpoint errors. <a title="View Gzip Compression V1.1 Release Notes" href="http://thewebdevelopmentblog.com/examples/gzip/gzip/releasenotes.txt" target="_blank">Release Notes</a>.</p>
<p><strong>UPDATE:</strong> Just released version 1.1 which fixes a security hole (thanks for the heads up Nail) as well as a number of other minor updates. <a title="View Gzip Compression V1.1 Release Notes" href="http://thewebdevelopmentblog.com/examples/gzip/gzip/releasenotes.txt" target="_blank">Release Notes</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2008/10/tip-speed-up-your-websites-using-gzip-and-merging-files/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
	</channel>
</rss>

