<?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>ghost3k</title>
	<atom:link href="http://blog.ghost3k.net/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.ghost3k.net</link>
	<description>me, projects, articles...</description>
	<lastBuildDate>Tue, 07 Jun 2011 22:46:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>1 Currently unreadable (pending) sectors</title>
		<link>http://blog.ghost3k.net/articles/linux/37/1-currently-unreadable-pending-sectors</link>
		<comments>http://blog.ghost3k.net/articles/linux/37/1-currently-unreadable-pending-sectors#comments</comments>
		<pubDate>Tue, 07 Jun 2011 22:39:34 +0000</pubDate>
		<dc:creator>ghost3k</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.ghost3k.net/?p=37</guid>
		<description><![CDATA[Woke up one morning with an awesome message in the server logs:
smartd[18500]: Device: /dev/sdd [SAT], 1 Currently unreadable (pending) sectors
Any hard disk error is a nightmare. It&#8217;s even more interesting when you have no ideea what happened.
The drive in question (/dev/sdd) is set up with another one in RAID 1. The error appeared while mdadm [...]]]></description>
			<content:encoded><![CDATA[<p>Woke up one morning with an awesome message in the server logs:</p>
<blockquote><p>smartd[18500]: Device: /dev/sdd [SAT], 1 Currently unreadable (pending) sectors</p></blockquote>
<p>Any hard disk error is a nightmare. It&#8217;s even more interesting when you have no ideea what happened.</p>
<p>The drive in question (/dev/sdd) is set up with another one in RAID 1. The error appeared while <em>mdadm</em> was running its monthly consistency check. Basically <em>mdadm</em> was checking if both drives have the same data by reading and comparing bytes, and at one point it got an error from /dev/sdd but it continued along instead of kicking the drive out of the raid array.<br />
Then <em>smartd</em> kept on screaming the line above in the logs for every 30 minutes.</p>
<p><strong>What does it mean?</strong><br />
Well&#8230; the hard disk drive now has 1 unreadable (pending) sector. This means there&#8217;s probably a bad block on the hdd, but it hasn&#8217;t been yet remapped. The bad block was detected by the hdd when mdadm tried to read it, but didn&#8217;t take any further action. A bad block is remapped only when a write happens.</p>
<p><strong>Is the hdd failing soon?</strong><br />
Maybe. Let&#8217;s just say the chances are a little higher.<br />
You should make sure you do have a backup at this point, and to be prepared to replace the hdd at any time.<br />
On the other hand, the hdd may function very well another couple of years. But you decide how precious is your data.</p>
<p><strong>Can I get rid of the error?</strong><br />
Yes, by forcing the hdd to write on the bad block, it will re-assign it to a spare block, if there are any left.</p>
<p>There are probably a few ways to achieve this:<br />
1) Format the whole hdd, but make you use the option to overwrite or zero the data &#8211; this means no quick format.<br />
2) Use the tool badbocks, run it with &#8220;-n&#8221; parameter (non-destructive read-write mode), any filesystem needs to be unmounted beforehand. badblocks will read and the write the same data on the hdd, block by block.<br />
3) If you want to do this with no downtime and the hdd is part of a raid array that can sustain one failed drive there&#8217;s another way:<br />
- run badblocks on the hdd (read only mode) with -v (verbose, will display percent of progress) and watch the logs to see if you catch at what percent do you get any media error from the hdd<br />
- stop badblocks once you get the error<br />
- optional &#8211; mdadm: you can enable internal bitmaps, it will make re-adding the drive later very fast compared to complete syncing (at least on RAID 1), check the man page<br />
- mdadm: fail the drive, then remove it from the array<br />
- run badblocks, using non-destructive read-write mode, you can specify which block portion to go trough &#8211; this is where you can calculate an approximate position from the percent obtained above<br />
- badblocks should finish faster this way, then running it through the whole drive<br />
- re-add the drive to the raid array<br />
- mdadm: you can disable internal bitmaps if you don&#8217;t want it anymore</p>
<p><strong>What to check for?</strong><br />
Run &#8220;smartctl -a&#8221; on the drive. Check the SMART attribute table, look for the row &#8220;Current_Pending_Sector&#8221;, and the corresponding value under &#8220;RAW_VALUE&#8221;.<br />
That&#8217;s the number of the current pending sectors, it is 1 when you first get the error. And then it goes back to 0 if you manage to remap the bad block.</p>
<p>There are no explicit commands given here, you should be reading the man pages of all the tols involved and make sure you understand what are you doing and why.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ghost3k.net/articles/linux/37/1-currently-unreadable-pending-sectors/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL &#8211; Converting large tables to InnoDB faster</title>
		<link>http://blog.ghost3k.net/articles/mysql/30/mysql-converting-large-tables-to-innodb-faster</link>
		<comments>http://blog.ghost3k.net/articles/mysql/30/mysql-converting-large-tables-to-innodb-faster#comments</comments>
		<pubDate>Thu, 20 Jan 2011 14:50:15 +0000</pubDate>
		<dc:creator>ghost3k</dc:creator>
				<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://blog.ghost3k.net/?p=30</guid>
		<description><![CDATA[Why?
The purpose of this article is to show you some tips that may help you reduce the conversion time of MySQL tables when switching to InnoDB.
Although this is not going to be a problem anymore since MySQL is using InnoDB by default in newer versions, there are still people out there using MyISAM tables which [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Why?</strong><br />
The purpose of this article is to show you some tips that may help you reduce the conversion time of MySQL tables when switching to InnoDB.<br />
Although this is not going to be a problem anymore since MySQL is using InnoDB by default in newer versions, there are still people out there using MyISAM tables which are considering upgrading to InnoDB to get some more feature or improve performance.</p>
<p><strong>Why use InnoDB?</strong><br />
I am not going to start debating this issue, each database environment has it&#8217;s own unique needs. If you are switching from MyISAM to InnoDB make sure you know why you are doing this, and what are you hoping to gain. For example I badly needed row-level locking because most of my queries kept waiting by the table locking in MyISAM.</p>
<p>I recommend reading the following articles:<br />
<a href="http://www.mysqlperformanceblog.com/2009/01/12/should-you-move-from-myisam-to-innodb/">MySQL Performance Blog &#8211; Should you move from MyISAM to Innodb ?</a><br />
<a href="http://www.mysqlperformanceblog.com/2010/11/22/moving-from-myisam-to-innodb-or-xtradb-basics/">MySQL Performance Blog &#8211; Moving from MyISAM to Innodb or XtraDB. Basics</a><br />
<a href="http://www.mysqlperformanceblog.com/2007/11/01/innodb-performance-optimization-basics/">MySQL Peformance Blog &#8211; Innodb Performance Optimization Basics</a><br />
<a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-restrictions.html">MySQL &#8211; Restrictions on InnoDB Tables</a><br />
<a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-tuning.html">MySQL &#8211; InnoDB Performance Tuning Tips</a></p>
<p><strong>Conversion</strong><br />
There are 2 ways to handle the conversion:<br />
1) run &#8220;ALTER TABLE t  ENGINE=InnoDB&#8221;<br />
2) dump the database using mysqldump, edit the file and change the &#8220;engine&#8221; line to use InnoDB and re-import it back, the table will be re-created using InnoDB</p>
<p>I&#8217;ll go with the first method, it should theoretically be faster, but you should do you own tests.</p>
<p>The conversion should be very fast for small tables (less than 100.000 rows). But you need to do some planning if you need to convert larger tables.<br />
I recommend first doing a test run of the conversion process on a server which is not in production or actively used, using a recent copy/backup of the live database. Selects are going to work doing the conversion process, but updates/inserts are going to be blocked or may time out depending on your application.</p>
<p><strong>My Story</strong><br />
My main issue was a table with 16M rows. I started by running the conversion in a testing environment, and it took around 6 hours &#8211; a pretty long time but considered acceptable since I could run it during night and the downtime should not be noticed by a lot of users.</p>
<p>Before starting the conversion on the live server, I have also applied the following MySQL server parameters:<br />
innodb_buffer_pool_size = 1536M     (this should be less than 80% of the available memory)<br />
innodb_log_file_size = 128M (beware that in order to change this parameter, you need to delete/move the log files or mysql won&#8217;t start)<br />
innodb_log_buffer_size = 8M<br />
innodb_flush_log_at_trx_commit = 0<br />
innodb_flush_method = O_DIRECT<br />
innodb_doublewrite = 0<br />
And don&#8217;t forget to remove these temporary parameters after you&#8217;re finished with the table conversion.</p>
<p>The final table conversion, using these parameters, ran for 1 hour and 11 minutes. I have no idea if these parameters account for such a large change in time (from 6h to 1h), or is just the fact that the live server had more memory available (the old myisam data files were also prefetched into memory by running dd on the .MYD and .MYI files a couple of times).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ghost3k.net/articles/mysql/30/mysql-converting-large-tables-to-innodb-faster/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Workaround for gettext caching issue in PHP</title>
		<link>http://blog.ghost3k.net/articles/php/11/gettext-caching-in-php</link>
		<comments>http://blog.ghost3k.net/articles/php/11/gettext-caching-in-php#comments</comments>
		<pubDate>Sun, 26 Apr 2009 17:51:20 +0000</pubDate>
		<dc:creator>ghost3k</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.ghost3k.net/?p=11</guid>
		<description><![CDATA[gettext is the GNU internationalization and localization (i18n) library, which can be used in almost any programming language. And, of course, it can be used under PHP too, to internationalize your web applications.
I will not go into gettext usage details, there are enough resources available for that.
Official PHP gettext documentation:
http://www.php.net/manual/en/book.gettext.php
A nice &#8220;gettext introduction&#8221; and well-done [...]]]></description>
			<content:encoded><![CDATA[<p>gettext is the GNU internationalization and localization (i18n) library, which can be used in almost any programming language. And, of course, it can be used under PHP too, to internationalize your web applications.</p>
<p>I will not go into gettext usage details, there are enough resources available for that.</p>
<p>Official PHP gettext documentation:<br />
<a href="http://www.php.net/manual/en/book.gettext.php"><small>http://www.php.net/manual/en/book.gettext.php</small></a><br />
A nice &#8220;gettext introduction&#8221; and well-done article:<br />
<small><a href="http://mel.melaxis.com/devblog/2005/08/06/localizing-php-web-sites-using-gettext/">http://mel.melaxis.com/devblog/2005/08/06/localizing-php-web-sites-using-gettext/</a></small><br />
Some benchmarks:<br />
<small><a href="http://mel.melaxis.com/devblog/2006/04/10/benchmarking-php-localization-is-gettext-fast-enough/">http://mel.melaxis.com/devblog/2006/04/10/benchmarking-php-localization-is-gettext-fast-enough/</a></small></p>
<p>And now let&#8217;s get back to what I actually wanted to talk about. It&#8217;s a well known problem that new or updated translated strings don&#8217;t appear immediately on your PHP page. Or to say the truth &#8211; they don&#8217;t come up at all. This happens only if you are running PHP as a module (mod_php, &#8230;) inside your webserver (Apache, etc), it does not affect php scripts run as CGI.</p>
<p>Why does it happen? The short answer is &#8211; because of caching.<br />
The first time you are initializing a text domain (loading a compiled binary .MO file), the file is loaded and cached in memory. Performance-wise, this is a very good thing, the translation string lookups run very fast and not needing to check the filesystem again and again helps a lot with the speed.<br />
The disadvantage is that if you update the .MO file or even delete it, gettext will not catch the change, it would still run with the file from the cache. Very irritating, especially in a development environment.</p>
<p>The recommended and most well-known solution is to restart the web server &#8211; this will restart the PHP module with its gettext extension and the cache will be cleared. Unfortunately restarting the web server is not always something that can be done easily, or we might not even have the privileges to do it if we&#8217;re on a shared hosting.</p>
<p>I came up with a workaround, that does not require fiddling at all with the web server, it&#8217;s all done through PHP. Basically, what we do, is make sure that we are always using the last updated .MO file by using copies of it. We check for modifications by checking the file modification time using <a href="http://www.php.net/filemtime">filemtime</a> and then we make sure that&#8217;s the one we&#8217;re using by <a href="http://www.php.net/manual/en/function.textdomain.php">binding</a> to a unique text domain and a filename computed from the file modification time. If that file exists (from a previous run), then that&#8217;s all. But if it doesn&#8217;t exists, then create it by copying the original .MO file.  So, what we are actually doing is activating a new unique translation domain for each and every time the .MO file is modified.</p>
<p>What you need to consider:</p>
<ul>
<li>you need write permissions in the locale folder</li>
<li>if you update the .MO file many time, then a lot of garbage temporary .MO files are generated &#8211; you need to remember to clear the folder once a month or something like that</li>
<li>is meant to be used in a <strong>development environment only</strong>, the filesystem checks are not benchmarked (even though PHP filestat caching may help here) and may be too expensive on a production server.</li>
</ul>
<p>Finally, the example code is:</p>
<pre class="php">
<span class="phpComment">// settings you may want to change
</span>$locale <span class="phpOperator">=</span> <span class="phpString">"en_US"</span><span class="phpText">;</span>  <span class="phpComment">// the locale you want
</span>$locales_root <span class="phpOperator">=</span> <span class="phpString">"locales"</span><span class="phpText">;</span>  <span class="phpComment">// locales directory
</span>$domain <span class="phpOperator">=</span> <span class="phpString"><span class="phpKeyword">"default"</span></span><span class="phpText">;</span> <span class="phpComment">// the domain you&#039;re using, this is the <span class="phpOperator">.</span>PO/<span class="phpOperator">.</span>MO <span class="phpFunction">file</span> name without the extension
</span>
<span class="phpComment">// activate the locale setting
</span><span class="phpFunction">setlocale</span><span class="phpOperator">(</span><span class="phpConstant">LC_ALL</span>, $locale<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpFunction">setlocale</span><span class="phpOperator">(</span><span class="phpConstant">LC_TIME</span>, $locale<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpFunction">putenv</span><span class="phpOperator">(</span><span class="phpString">"LANG<span class="phpOperator">=</span>$locale"</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpComment">// path to the <span class="phpOperator">.</span>MO <span class="phpFunction">file</span> that we should monitor
</span>$filename <span class="phpOperator">=</span> <span class="phpString">"$locales_root/$locale/<span class="phpConstant">LC_MESSAGES</span>/$domain<span class="phpOperator">.</span>mo"</span><span class="phpText">;</span>
$mtime <span class="phpOperator">=</span> <span class="phpFunction">filemtime</span><span class="phpOperator">(</span>$filename<span class="phpOperator">)</span><span class="phpText">;</span> <span class="phpComment">// check its modification time
</span><span class="phpComment">// our<span class="phpKeyword"> new </span>unique <span class="phpOperator">.</span>MO <span class="phpFunction">file</span>
</span>$filename_new <span class="phpOperator">=</span> <span class="phpString">"$locales_root/$locale/<span class="phpConstant">LC_MESSAGES</span>/<span class="phpOperator">{</span>$domain<span class="phpOperator">}</span>_<span class="phpOperator">{</span>$mtime<span class="phpOperator">}</span>.mo"</span><span class="phpText">;</span> 
<span class="phpKeyword">
if </span><span class="phpOperator">(</span><span class="phpOperator">!</span><span class="phpFunction">file_exists</span><span class="phpOperator">(</span>$filename_new<span class="phpOperator">)</span><span class="phpOperator">)</span> <span class="phpOperator">{</span>  <span class="phpComment">// check<span class="phpKeyword"> if </span>we have created it before
</span>      <span class="phpComment">//<span class="phpKeyword"> if </span>not, create it now, by copying the original
</span>      <span class="phpFunction">copy</span><span class="phpOperator">(</span>$filename,$filename_new<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpOperator">}</span>
<span class="phpComment">// compute the<span class="phpKeyword"> new </span>domain name
</span>$domain_new <span class="phpOperator">=</span> <span class="phpString">"<span class="phpOperator">{</span>$domain<span class="phpOperator">}</span>_<span class="phpOperator">{</span>$mtime<span class="phpOperator">}</span>"</span><span class="phpText">;</span>
<span class="phpComment">// bind it
</span><span class="phpFunction">bind<span class="phpFunction">textdomain</span></span><span class="phpOperator">(</span>$domain_new,$locales_root<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpComment">// then activate it
</span><span class="phpFunction">textdomain</span><span class="phpOperator">(</span>$domain_new<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpComment">// all done
</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.ghost3k.net/articles/php/11/gettext-caching-in-php/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Postfix + Dovecot</title>
		<link>http://blog.ghost3k.net/articles/linux/10/postfix-dovecot</link>
		<comments>http://blog.ghost3k.net/articles/linux/10/postfix-dovecot#comments</comments>
		<pubDate>Sun, 23 Sep 2007 11:30:46 +0000</pubDate>
		<dc:creator>ghost3k</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.misalpina.net/ghost3k/articles/linux/10/postfix-dovecot</guid>
		<description><![CDATA[I have just moved to a new server last week, so I started fresh and decided to go ahead with a new mail server configuration.
On the old server I was using qmail+vpopmail+courier.
qmail &#8211; smtp, pop3 server
vpopmail &#8211; provides mailbox &#038; virtual domain management
courier &#8211; for the imap server part
I got tired of all the patching [...]]]></description>
			<content:encoded><![CDATA[<p>I have just moved to a new server last week, so I started fresh and decided to go ahead with a new mail server configuration.</p>
<p>On the old server I was using qmail+vpopmail+courier.<br />
qmail &#8211; smtp, pop3 server<br />
vpopmail &#8211; provides mailbox &#038; virtual domain management<br />
courier &#8211; for the imap server part</p>
<p>I got tired of all the patching mess in qmail. The only way to continue using qmail was to copy the already patched version, because I couldn&#8217;t recall all the patches and hand changes I have done over time. Yeah, I even modified its source code myself to fix some small things, that&#8217;s the best part of it &#8211; qmail is composed of very very small programs and have nice clean source code, easy to understand and follow. But you get tired after a while and you want something that can do more and just work. So, here I am now using postfix+dovecot:<br />
postfix &#8211; smtp server<br />
dovecot &#8211; pop3+imap server, mailbox &#038; virtual domain management</p>
<p>I recreated all the emails and domains in dovecot, copied the Maildir directories, set the old server to forward all emails to the new one just in case someone still sent email to the old MX entry, and that was all. 0 second downtime and nobody noticed a thing.</p>
<p>I had a great howto/guide for installing Postfix+Dovecot:<br />
<a href="http://johnny.chadda.se/2007/04/15/mail-server-howto-postfix-and-dovecot-with-mysql-and-tlsssl-postgrey-and-dspam/">http://johnny.chadda.se/2007/04/15/mail-server-howto-postfix-and-dovecot-with-mysql-and-tlsssl-postgrey-and-dspam/</a></p>
<p>One thing to check if using that howto as a base, a friend that has an account and uses Outlook Express couldn&#8217;t send mail at all. I then figured out that OE would not want to authenticate at all with the smtp server, I have then found out that OE will not login if the only auth method advertised by the smtp server is &#8220;PLAIN&#8221;, even though everything is under TLS. After testing different auth methods, it seemed to be ok if &#8220;LOGIN&#8221; it&#8217;s on. So, just edit doveconf.conf and make sure you have both PLAIN and LOGIN activated:</p>
<p><strong>doveconf.conf :</strong><br />
<code><br />
...<br />
auth default {<br />
&nbsp;    mechanisms = plain login<br />
&nbsp;    ...<br />
&nbsp;    }<br />
...<br />
</code></p>
<p>That&#8217;s all for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ghost3k.net/articles/linux/10/postfix-dovecot/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notebook Design</title>
		<link>http://blog.ghost3k.net/articles/zzz/9/notebook-design</link>
		<comments>http://blog.ghost3k.net/articles/zzz/9/notebook-design#comments</comments>
		<pubDate>Sun, 18 Feb 2007 21:16:54 +0000</pubDate>
		<dc:creator>ghost3k</dc:creator>
				<category><![CDATA[zzz]]></category>

		<guid isPermaLink="false">http://www.misalpina.net/ghost3k/articles/zzz/9/notebook-design</guid>
		<description><![CDATA[I don&#8217;t like all these new and fancy models.
Why are all the cables on left/right side, it must be really cute having cables going out of the laptop on the left on your desk, what a mess.
Why are the audio jacks in front, now really, why would you want to have cables in front of [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t like all these new and fancy models.</p>
<p>Why are all the cables on left/right side, it must be really cute having cables going out of the laptop on the left on your desk, what a mess.<br />
Why are the audio jacks in front, now really, why would you want to have cables in front of your laptop.<br />
Who killed the pointing stick? I loved it on my old IBM ThinkPad, it was so precise. But no, no, no, the touchpad is the way to go. And if you somehow really want a pointing stick&#8230; they have it hidden away in one of the &#8220;premium&#8221; models.</p>
<p>Where is the world heading to&#8230;<br />
at least my Dell Inspiron 6400 managed to get some things right <img src='http://blog.ghost3k.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ghost3k.net/articles/zzz/9/notebook-design/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Height for an empty div in Internet Explorer</title>
		<link>http://blog.ghost3k.net/articles/webdev/8/height-for-an-empty-div-in-internet-explorer</link>
		<comments>http://blog.ghost3k.net/articles/webdev/8/height-for-an-empty-div-in-internet-explorer#comments</comments>
		<pubDate>Mon, 28 Aug 2006 20:29:54 +0000</pubDate>
		<dc:creator>ghost3k</dc:creator>
				<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://www.misalpina.net/ghost3k/webdev/height-for-an-empty-div-in-internet-explorer</guid>
		<description><![CDATA[I have just found about this stupid problem yesterday when trying to add some nice round corners to a page. I was using 4 empty div&#8217;s, setting the positions and a background image trough css. Everything was okay in SeaMonkey and Opera, but definitely not ok on Internet Explorer.
Trying to debug the problem, I added [...]]]></description>
			<content:encoded><![CDATA[<p>I have just found about this stupid problem yesterday when trying to add some nice round corners to a page. I was using 4 empty div&#8217;s, setting the positions and a background image trough css. Everything was okay in SeaMonkey and Opera, but definitely not ok on Internet Explorer.</p>
<p>Trying to debug the problem, I added a 1px red border to all div&#8217;s to check correct positioning. So, there was supposed to be 4 red squares, the div&#8217;s were each exactly 9 x 9 px. But instead of that, Internet Explorer would display 4 red boxes having their height waaaay larger than 9px. The div border did not appear as a square even though its css specified exactly &#8220;<u>width: 9px; height:9px</u>&#8220;. That was pretty nice for the browser to ignore my css code.</p>
<p>After some researching, found about someone who stumbled over the same problem:<br />
<a href="http://www.zucchetti.co.uk/?p=75">http://www.zucchetti.co.uk/?p=75</a></p>
<p>It seems it&#8217;s actually a IE-only problem. When rendering an empty div, Internet Explorer will use the current font size as its height. The fix is as simple as setting the font size to 0 by using &#8220;<u>font-size:0</u>&#8220;, getting rid of the minimum div height being the font-size.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ghost3k.net/articles/webdev/8/height-for-an-empty-div-in-internet-explorer/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome&#8230;.</title>
		<link>http://blog.ghost3k.net/articles/zzz/3/welcome</link>
		<comments>http://blog.ghost3k.net/articles/zzz/3/welcome#comments</comments>
		<pubDate>Sat, 18 Mar 2006 23:45:27 +0000</pubDate>
		<dc:creator>ghost3k</dc:creator>
				<category><![CDATA[zzz]]></category>

		<guid isPermaLink="false">http://www.misalpina.net/ghost3k/?p=3</guid>
		<description><![CDATA[This should be my personal site, where I SHOULD be posting different articles about interesting problems and solutions, my projects, ideas&#8230;
]]></description>
			<content:encoded><![CDATA[<p>This should be my personal site, where I SHOULD be posting different articles about interesting problems and solutions, my projects, ideas&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ghost3k.net/articles/zzz/3/welcome/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

